public class EncodingUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SIZEOF_UNSIGNED_INT |
static int |
SIZEOF_UNSIGNED_SHORT |
Modifier and Type | Method and Description |
---|---|
static byte[] |
asUTF8Bytes(CharSequence string) |
static char[] |
convertToHexCharArray(byte[] from) |
static String |
convertToHexString(byte[] from) |
static String |
convertToHexString(ByteBuffer bb) |
static int |
encodedBooleanLength() |
static int |
encodedByteLength() |
static int |
encodedCharLength() |
static int |
encodedDoubleLength() |
static int |
encodedFieldTableLength(FieldTable table) |
static int |
encodedFloatLength() |
static int |
encodedIntegerLength() |
static int |
encodedLongLength() |
static int |
encodedLongStringLength(String s) |
static int |
encodedLongstrLength(byte[] bytes) |
static int |
encodedShortLength() |
static int |
encodedShortStringLength(AMQShortString s) |
static int |
encodedShortStringLength(int i) |
static int |
encodedShortStringLength(long l) |
static int |
encodedShortStringLength(short s) |
static int |
encodedShortStringLength(String s) |
static int |
getUTF8Length(CharSequence string) |
static AMQShortString |
readAMQShortString(DataInput buffer) |
static boolean |
readBoolean(DataInput buffer) |
static boolean[] |
readBooleans(DataInput buffer) |
static byte |
readByte(DataInput buffer) |
static byte[] |
readBytes(DataInput buffer) |
static char |
readChar(DataInput buffer) |
static double |
readDouble(DataInput buffer) |
static FieldTable |
readFieldTable(MarkableDataInput input) |
static float |
readFloat(DataInput buffer) |
static int |
readInteger(DataInput buffer) |
static long |
readLong(DataInput buffer) |
static long |
readLongAsShortString(DataInput buffer) |
static byte[] |
readLongstr(DataInput buffer) |
static String |
readLongString(DataInput buffer) |
static short |
readShort(DataInput buffer) |
static String |
readShortString(DataInput buffer) |
static long |
readTimestamp(DataInput buffer) |
static long |
readUnsignedInteger(DataInput buffer) |
static int |
unsignedIntegerLength() |
static void |
writeBoolean(DataOutput buffer,
boolean aBoolean) |
static void |
writeBooleans(DataOutput buffer,
boolean value) |
static void |
writeBooleans(DataOutput buffer,
boolean[] values) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2,
boolean value3) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2,
boolean value3,
boolean value4) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2,
boolean value3,
boolean value4,
boolean value5) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2,
boolean value3,
boolean value4,
boolean value5,
boolean value6) |
static void |
writeBooleans(DataOutput buffer,
boolean value0,
boolean value1,
boolean value2,
boolean value3,
boolean value4,
boolean value5,
boolean value6,
boolean value7) |
static void |
writeByte(DataOutput buffer,
byte aByte) |
static void |
writeBytes(DataOutput buffer,
byte[] data) |
static void |
writeChar(DataOutput buffer,
char character) |
static void |
writeDouble(DataOutput buffer,
Double aDouble) |
static void |
writeFieldTableBytes(DataOutput buffer,
FieldTable table) |
static void |
writeFloat(DataOutput buffer,
float aFloat) |
static void |
writeInteger(DataOutput buffer,
int aInteger) |
static void |
writeLong(DataOutput buffer,
long aLong) |
static void |
writeLongAsShortString(DataOutput buffer,
long l) |
static void |
writeLongstr(DataOutput buffer,
byte[] data)
This is used for writing longstrs.
|
static void |
writeLongStringBytes(DataOutput buffer,
String s) |
static void |
writeShort(DataOutput buffer,
short aShort) |
static void |
writeShortStringBytes(DataOutput buffer,
AMQShortString s) |
static void |
writeShortStringBytes(QpidByteBuffer buffer,
AMQShortString s) |
static void |
writeTimestamp(DataOutput buffer,
long timestamp) |
static void |
writeUnsignedByte(DataOutput buffer,
short b) |
static void |
writeUnsignedInteger(DataOutput buffer,
long l) |
static void |
writeUnsignedInteger(QpidByteBuffer buffer,
long l) |
static void |
writeUnsignedShort(DataOutput buffer,
int s) |
static void |
writeUnsignedShort(QpidByteBuffer buffer,
int s) |
public static final int SIZEOF_UNSIGNED_SHORT
public static final int SIZEOF_UNSIGNED_INT
public static int encodedShortStringLength(String s)
public static int encodedShortStringLength(short s)
public static int encodedShortStringLength(int i)
public static int encodedShortStringLength(long l)
public static int encodedShortStringLength(AMQShortString s)
public static int encodedLongStringLength(String s)
public static int encodedLongstrLength(byte[] bytes)
public static int encodedFieldTableLength(FieldTable table)
public static void writeLongAsShortString(DataOutput buffer, long l) throws IOException
IOException
public static void writeShortStringBytes(DataOutput buffer, AMQShortString s) throws IOException
IOException
public static void writeShortStringBytes(QpidByteBuffer buffer, AMQShortString s) throws IOException
IOException
public static void writeLongStringBytes(DataOutput buffer, String s) throws IOException
IOException
public static void writeUnsignedByte(DataOutput buffer, short b) throws IOException
IOException
public static void writeUnsignedShort(DataOutput buffer, int s) throws IOException
IOException
public static void writeUnsignedShort(QpidByteBuffer buffer, int s) throws IOException
IOException
public static int unsignedIntegerLength()
public static void writeUnsignedInteger(DataOutput buffer, long l) throws IOException
IOException
public static void writeUnsignedInteger(QpidByteBuffer buffer, long l) throws IOException
IOException
public static void writeFieldTableBytes(DataOutput buffer, FieldTable table) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean[] values) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2, boolean value3) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2, boolean value3, boolean value4) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2, boolean value3, boolean value4, boolean value5) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2, boolean value3, boolean value4, boolean value5, boolean value6) throws IOException
IOException
public static void writeBooleans(DataOutput buffer, boolean value0, boolean value1, boolean value2, boolean value3, boolean value4, boolean value5, boolean value6, boolean value7) throws IOException
IOException
public static void writeLongstr(DataOutput buffer, byte[] data) throws IOException
buffer
- buffer to write todata
- data to writeIOException
- if there is an issue writing the outputpublic static void writeTimestamp(DataOutput buffer, long timestamp) throws IOException
IOException
public static boolean[] readBooleans(DataInput buffer) throws IOException
IOException
public static FieldTable readFieldTable(MarkableDataInput input) throws AMQFrameDecodingException, IOException
AMQFrameDecodingException
IOException
public static AMQShortString readAMQShortString(DataInput buffer) throws IOException
IOException
public static String readShortString(DataInput buffer) throws IOException
IOException
public static String readLongString(DataInput buffer) throws IOException
IOException
public static byte[] readLongstr(DataInput buffer) throws IOException
IOException
public static long readTimestamp(DataInput buffer) throws IOException
IOException
public static char[] convertToHexCharArray(byte[] from)
public static String convertToHexString(byte[] from)
public static String convertToHexString(ByteBuffer bb)
public static void writeBoolean(DataOutput buffer, boolean aBoolean) throws IOException
IOException
public static boolean readBoolean(DataInput buffer) throws IOException
IOException
public static int encodedBooleanLength()
public static void writeByte(DataOutput buffer, byte aByte) throws IOException
IOException
public static byte readByte(DataInput buffer) throws IOException
IOException
public static int encodedByteLength()
public static void writeShort(DataOutput buffer, short aShort) throws IOException
IOException
public static short readShort(DataInput buffer) throws IOException
IOException
public static int encodedShortLength()
public static void writeInteger(DataOutput buffer, int aInteger) throws IOException
IOException
public static int readInteger(DataInput buffer) throws IOException
IOException
public static int encodedIntegerLength()
public static void writeLong(DataOutput buffer, long aLong) throws IOException
IOException
public static long readLong(DataInput buffer) throws IOException
IOException
public static int encodedLongLength()
public static void writeFloat(DataOutput buffer, float aFloat) throws IOException
IOException
public static float readFloat(DataInput buffer) throws IOException
IOException
public static int encodedFloatLength()
public static void writeDouble(DataOutput buffer, Double aDouble) throws IOException
IOException
public static double readDouble(DataInput buffer) throws IOException
IOException
public static int encodedDoubleLength()
public static byte[] readBytes(DataInput buffer) throws IOException
IOException
public static void writeBytes(DataOutput buffer, byte[] data) throws IOException
IOException
public static int encodedCharLength()
public static char readChar(DataInput buffer) throws IOException
IOException
public static void writeChar(DataOutput buffer, char character) throws IOException
IOException
public static long readLongAsShortString(DataInput buffer) throws IOException
IOException
public static long readUnsignedInteger(DataInput buffer) throws IOException
IOException
public static byte[] asUTF8Bytes(CharSequence string)
public static int getUTF8Length(CharSequence string)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.