Class StreamBody
java.lang.Object
com.swiftmq.impl.streams.comp.message.StreamBody
Facade to wrap the body of a javax.jms.StreamMessage
- Author:
- IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReads a boolean.bytereadByte()Reads a byte.voidreadBytes(byte[] bytes) Reads into an array of bytes.charreadChar()Reads a char.doubleReads a double.floatReads a float.intreadInt()Reads an int.longreadLong()Reads a long.Reads an object.shortReads a short.Reads a string.reset()Resets the stream body to the beginning.writeBoolean(boolean b) Write a boolean.writeByte(byte b) Write a byte.writeBytes(byte[] b) Write a byte array.writeBytes(byte[] b, int off, int len) Write a byte array with offset and length.writeChar(char b) Write a char.writeDouble(double b) Write a double.writeFloat(float b) Write a float.writeInt(int b) Write a int.writeLong(long b) Write a long.Write a Object.writeShort(short b) Write a short.Write a String.
-
Method Details
-
readBoolean
public boolean readBoolean() throws JMSExceptionReads a boolean.- Returns:
- boolean
- Throws:
JMSException
-
readByte
public byte readByte() throws JMSExceptionReads a byte.- Returns:
- byte
- Throws:
JMSException
-
readChar
public char readChar() throws JMSExceptionReads a char.- Returns:
- char
- Throws:
JMSException
-
readBytes
public void readBytes(byte[] bytes) throws JMSException Reads into an array of bytes.- Parameters:
bytes- array of bytes- Throws:
JMSException
-
readShort
public short readShort() throws JMSExceptionReads a short.- Returns:
- short
- Throws:
JMSException
-
readInt
public int readInt() throws JMSExceptionReads an int.- Returns:
- int
- Throws:
JMSException
-
readLong
public long readLong() throws JMSExceptionReads a long.- Returns:
- long
- Throws:
JMSException
-
readDouble
public double readDouble() throws JMSExceptionReads a double.- Returns:
- double
- Throws:
JMSException
-
readFloat
public float readFloat() throws JMSExceptionReads a float.- Returns:
- float.
- Throws:
JMSException
-
readString
Reads a string.- Returns:
- string
- Throws:
JMSException
-
readObject
Reads an object.- Returns:
- object
- Throws:
JMSException
-
reset
Resets the stream body to the beginning.- Returns:
- StreamBody
- Throws:
JMSException
-
writeBoolean
Write a boolean.- Parameters:
b- boolean- Returns:
- StreamBody
- Throws:
JMSException
-
writeChar
Write a char.- Parameters:
b- char- Returns:
- StreamBody
- Throws:
JMSException
-
writeByte
Write a byte.- Parameters:
b- byte- Returns:
- StreamBody
- Throws:
JMSException
-
writeBytes
Write a byte array.- Parameters:
b- byte array- Returns:
- StreamBody
- Throws:
JMSException
-
writeBytes
Write a byte array with offset and length.- Parameters:
b- byte arrayoff- offsetlen- length- Returns:
- StreamBody
- Throws:
JMSException
-
writeShort
Write a short.- Parameters:
b- short- Returns:
- StreamBody
- Throws:
JMSException
-
writeInt
Write a int.- Parameters:
b- int- Returns:
- StreamBody
- Throws:
JMSException
-
writeLong
Write a long.- Parameters:
b- long- Returns:
- StreamBody
- Throws:
JMSException
-
writeDouble
Write a double.- Parameters:
b- double- Returns:
- StreamBody
- Throws:
JMSException
-
writeFloat
Write a float.- Parameters:
b- float- Returns:
- StreamBody
- Throws:
JMSException
-
writeString
Write a String.- Parameters:
b- String- Returns:
- StreamBody
- Throws:
JMSException
-
writeObject
Write a Object.- Parameters:
b- Object- Returns:
- StreamBody
- Throws:
JMSException
-