- All Superinterfaces:
- Message
- See Also:
- Top Examples, Source Code,
Session.createBytesMessage()
,
MapMessage
,
ObjectMessage
,
StreamMessage
,
TextMessage
public long getBodyLength()
throws JMSException
- See Also:
- MessageNotReadableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1709]I am not finding this method
By Pramod Reddy on 2006/02/09 10:34:00 Rate
Hey I am using RAD 6.0.
I am finding all the remaining methods except getBodyLength ( ) .
what is the problem. i need this method to dynamically allocate the byte array.
plz help me
Thank You
[1780]I had the same problem
By Anonymous on 2006/06/22 06:28:07 Rate
The problem was that the version of JMS I was using was older than this spec. I upgraded jms.jar and all is well.
public boolean readBoolean()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public byte readByte()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int readBytes(byte[] value)
throws JMSException
- See Also:
- MessageNotReadableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int readBytes(byte[] value,
int length)
throws JMSException
- See Also:
- MessageNotReadableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public char readChar()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public double readDouble()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public float readFloat()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int readInt()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public long readLong()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public short readShort()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int readUnsignedByte()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public int readUnsignedShort()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public String readUTF()
throws JMSException
- See Also:
- MessageNotReadableException, MessageEOFException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void reset()
throws JMSException
- See Also:
- MessageFormatException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeBoolean(boolean value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeByte(byte value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeBytes(byte[] value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[250]Send JMS Byte Message
By rodolfo { dot } dias-eds { at } eds { dot } com on 2003/12/15 17:43:19 Rate
public void sendMessage ( ) throws JMSException, NamingException {
QueueSender send = session.createSender ( que ) ;
BytesMessage bMessage = session.createBytesMessage ( ) ;
System.out.println ( "Lendo o arquivo...:" +new Date ( ) ) ;
try {
byte [ ] out = new byte [ 0 ] ;
int bufLen=10000*1024;
byte [ ] buf = new byte [ bufLen ] ;
byte [ ] tmp = null;
int len = 0;
while ( ( len = is.read ( buf, 0, bufLen ) ) != -1 ) {
tmp = new byte [ out.length + len ] ;
System.arraycopy ( out, 0, tmp, 0, out.length ) ;
System.arraycopy ( buf, 0, tmp, out.length, len ) ;
out = tmp;
tmp = null;
}
System.out.println ( "Arquivo lido!.:" + new Date ( ) ) ;
bMessage.writeBytes ( out ) ;
send.send ( bMessage ) ;
System.out.println ( "sendRecvAsync, send text" ) ;
} catch ( Exception e ) {
e.printStackTrace ( ) ;
} finally {
if ( send != null ) try { send.close ( ) ; } catch ( Exception se ) { }
if ( is != null ) try { is.close ( ) ; } catch ( Exception ie ) { }
System.out.println ( "Fim sendRecvAsync" ) ;
}
}
public void writeBytes(byte[] value,
int offset,
int length)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeChar(char value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeDouble(double value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeFloat(float value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeInt(int value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeLong(long value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeObject(Object value)
throws JMSException
- See Also:
- NullPointerException, MessageNotWriteableException, MessageFormatException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeShort(short value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public void writeUTF(String value)
throws JMSException
- See Also:
- MessageNotWriteableException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples