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 int
read(ByteSequence packet)
static boolean
readBoolean(ByteSequence packet)
static byte
readByte(ByteSequence packet)
static char
readCharBig(ByteSequence packet)
static char
readCharLittle(ByteSequence packet)
static double
readDoubleBig(ByteSequence packet)
static double
readDoubleLittle(ByteSequence packet)
static float
readFloatBig(ByteSequence packet)
static float
readFloatLittle(ByteSequence packet)
static void
readFully(ByteSequence packet, byte[] b)
static void
readFully(ByteSequence packet, byte[] b, int off, int len)
static int
readIntBig(ByteSequence packet)
static int
readIntLittle(ByteSequence packet)
static long
readLongBig(ByteSequence packet)
static long
readLongLittle(ByteSequence packet)
static short
readShortBig(ByteSequence packet)
static short
readShortLittle(ByteSequence packet)
static int
readUnsignedByte(ByteSequence packet)
static int
readUnsignedShortBig(ByteSequence packet)
static int
readUnsignedShortLittle(ByteSequence packet)
static int
remaining(ByteSequence packet)
static int
skipBytes(ByteSequence packet, int n)
static byte[]
toByteArray(ByteSequence packet)
static void
write(ByteSequence packet, byte[] b)
static void
write(ByteSequence packet, byte[] b, int off, int len)
static void
write(ByteSequence packet, int b)
static void
writeBoolean(ByteSequence packet, boolean v)
static void
writeByte(ByteSequence packet, int v)
static void
writeCharBig(ByteSequence packet, int v)
static void
writeCharLittle(ByteSequence packet, int v)
static void
writeDoubleBig(ByteSequence packet, double v)
static void
writeDoubleLittle(ByteSequence packet, double v)
static void
writeFloatBig(ByteSequence packet, float v)
static void
writeFloatLittle(ByteSequence packet, float v)
static void
writeIntBig(ByteSequence packet, int v)
static void
writeIntLittle(ByteSequence packet, int v)
static void
writeLongBig(ByteSequence packet, long v)
static void
writeLongLittle(ByteSequence packet, long v)
static void
writeRawDoubleBig(ByteSequence packet, double v)
static void
writeRawDoubleLittle(ByteSequence packet, double v)
static void
writeRawFloatBig(ByteSequence packet, float v)
static void
writeRawFloatLittle(ByteSequence packet, float v)
static void
writeShortBig(ByteSequence packet, int v)
static void
writeShortLittle(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
-
-