Package org.apache.activemq.util
Class ByteSequenceData
- java.lang.Object
-
- org.apache.activemq.util.ByteSequenceData
-
public final class ByteSequenceData extends Object
Used to write and read primitives to and from a ByteSequence.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intread(ByteSequence packet)static booleanreadBoolean(ByteSequence packet)static bytereadByte(ByteSequence packet)static charreadCharBig(ByteSequence packet)static charreadCharLittle(ByteSequence packet)static doublereadDoubleBig(ByteSequence packet)static doublereadDoubleLittle(ByteSequence packet)static floatreadFloatBig(ByteSequence packet)static floatreadFloatLittle(ByteSequence packet)static voidreadFully(ByteSequence packet, byte[] b)static voidreadFully(ByteSequence packet, byte[] b, int off, int len)static intreadIntBig(ByteSequence packet)static intreadIntLittle(ByteSequence packet)static longreadLongBig(ByteSequence packet)static longreadLongLittle(ByteSequence packet)static shortreadShortBig(ByteSequence packet)static shortreadShortLittle(ByteSequence packet)static intreadUnsignedByte(ByteSequence packet)static intreadUnsignedShortBig(ByteSequence packet)static intreadUnsignedShortLittle(ByteSequence packet)static intremaining(ByteSequence packet)static intskipBytes(ByteSequence packet, int n)static byte[]toByteArray(ByteSequence packet)static voidwrite(ByteSequence packet, byte[] b)static voidwrite(ByteSequence packet, byte[] b, int off, int len)static voidwrite(ByteSequence packet, int b)static voidwriteBoolean(ByteSequence packet, boolean v)static voidwriteByte(ByteSequence packet, int v)static voidwriteCharBig(ByteSequence packet, int v)static voidwriteCharLittle(ByteSequence packet, int v)static voidwriteDoubleBig(ByteSequence packet, double v)static voidwriteDoubleLittle(ByteSequence packet, double v)static voidwriteFloatBig(ByteSequence packet, float v)static voidwriteFloatLittle(ByteSequence packet, float v)static voidwriteIntBig(ByteSequence packet, int v)static voidwriteIntLittle(ByteSequence packet, int v)static voidwriteLongBig(ByteSequence packet, long v)static voidwriteLongLittle(ByteSequence packet, long v)static voidwriteRawDoubleBig(ByteSequence packet, double v)static voidwriteRawDoubleLittle(ByteSequence packet, double v)static voidwriteRawFloatBig(ByteSequence packet, float v)static voidwriteRawFloatLittle(ByteSequence packet, float v)static voidwriteShortBig(ByteSequence packet, int v)static voidwriteShortLittle(ByteSequence packet, int v)
-
-
-
Method Detail
-
toByteArray
public static byte[] toByteArray(ByteSequence packet)
-
remaining
public static int remaining(ByteSequence packet)
-
read
public static int read(ByteSequence packet)
-
readFully
public static void readFully(ByteSequence packet, byte[] b) throws IOException
- Throws:
IOException
-
readFully
public static void readFully(ByteSequence packet, byte[] b, int off, int len) throws IOException
- Throws:
IOException
-
skipBytes
public static int skipBytes(ByteSequence packet, int n) throws IOException
- Throws:
IOException
-
readBoolean
public static boolean readBoolean(ByteSequence packet) throws IOException
- Throws:
IOException
-
readByte
public static byte readByte(ByteSequence packet) throws IOException
- Throws:
IOException
-
readUnsignedByte
public static int readUnsignedByte(ByteSequence packet) throws IOException
- Throws:
IOException
-
readShortBig
public static short readShortBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readShortLittle
public static short readShortLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readUnsignedShortBig
public static int readUnsignedShortBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readUnsignedShortLittle
public static int readUnsignedShortLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readCharBig
public static char readCharBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readCharLittle
public static char readCharLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readIntBig
public static int readIntBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readIntLittle
public static int readIntLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readLongBig
public static long readLongBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readLongLittle
public static long readLongLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readDoubleBig
public static double readDoubleBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readDoubleLittle
public static double readDoubleLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
readFloatBig
public static float readFloatBig(ByteSequence packet) throws IOException
- Throws:
IOException
-
readFloatLittle
public static float readFloatLittle(ByteSequence packet) throws IOException
- Throws:
IOException
-
write
public static void write(ByteSequence packet, int b) throws IOException
- Throws:
IOException
-
write
public static void write(ByteSequence packet, byte[] b) throws IOException
- Throws:
IOException
-
write
public static void write(ByteSequence packet, byte[] b, int off, int len) throws IOException
- Throws:
IOException
-
writeBoolean
public static void writeBoolean(ByteSequence packet, boolean v) throws IOException
- Throws:
IOException
-
writeByte
public static void writeByte(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeShortBig
public static void writeShortBig(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeShortLittle
public static void writeShortLittle(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeCharBig
public static void writeCharBig(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeCharLittle
public static void writeCharLittle(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeIntBig
public static void writeIntBig(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeIntLittle
public static void writeIntLittle(ByteSequence packet, int v) throws IOException
- Throws:
IOException
-
writeLongBig
public static void writeLongBig(ByteSequence packet, long v) throws IOException
- Throws:
IOException
-
writeLongLittle
public static void writeLongLittle(ByteSequence packet, long v) throws IOException
- Throws:
IOException
-
writeDoubleBig
public static void writeDoubleBig(ByteSequence packet, double v) throws IOException
- Throws:
IOException
-
writeDoubleLittle
public static void writeDoubleLittle(ByteSequence packet, double v) throws IOException
- Throws:
IOException
-
writeFloatBig
public static void writeFloatBig(ByteSequence packet, float v) throws IOException
- Throws:
IOException
-
writeFloatLittle
public static void writeFloatLittle(ByteSequence packet, float v) throws IOException
- Throws:
IOException
-
writeRawDoubleBig
public static void writeRawDoubleBig(ByteSequence packet, double v) throws IOException
- Throws:
IOException
-
writeRawDoubleLittle
public static void writeRawDoubleLittle(ByteSequence packet, double v) throws IOException
- Throws:
IOException
-
writeRawFloatBig
public static void writeRawFloatBig(ByteSequence packet, float v) throws IOException
- Throws:
IOException
-
writeRawFloatLittle
public static void writeRawFloatLittle(ByteSequence packet, float v) throws IOException
- Throws:
IOException
-
-