Package com.rabbitmq.client.impl
Class ValueReader
java.lang.Object
com.rabbitmq.client.impl.ValueReader
Helper class to read AMQP wire-protocol encoded values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataInputStream
The stream we are reading from.private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a MethodArgumentReader streaming over the given DataInputStream. -
Method Summary
Modifier and TypeMethodDescriptionRead a field-arrayprivate static byte[]
Convenience method - reads a 32-bit-length-prefix byte vector from a DataInputStream.(package private) static Object
final int
readLong()
Public API - reads an integer.final long
Public API - reads a long integer.final LongString
Public API - reads a long string.private static LongString
Convenience method - reads a long string argument from a DataInputStream.final int
Public API - reads an octet.final int
Public API - reads a short integer.final String
Public API - reads a short string.private static String
Convenience method - reads a short string from a DataInput Stream.Public API - reads a table.Reads a table argument from a given stream.final Date
Public API - reads an timestamp.private static Date
Convenience method - reads a timestamp argument from the DataInputStream.private static long
Read an unsigned intprivate static long
unsignedExtend
(int value) Protected API - Cast an int to a long without extending the sign bit of the int out into the high half of the long.
-
Field Details
-
INT_MASK
private static final long INT_MASK- See Also:
-
in
The stream we are reading from.
-
-
Constructor Details
-
ValueReader
Construct a MethodArgumentReader streaming over the given DataInputStream.
-
-
Method Details
-
unsignedExtend
private static long unsignedExtend(int value) Protected API - Cast an int to a long without extending the sign bit of the int out into the high half of the long. -
readShortstr
Convenience method - reads a short string from a DataInput Stream.- Throws:
IOException
-
readShortstr
Public API - reads a short string.- Throws:
IOException
-
readBytes
Convenience method - reads a 32-bit-length-prefix byte vector from a DataInputStream.- Throws:
IOException
-
readLongstr
Convenience method - reads a long string argument from a DataInputStream.- Throws:
IOException
-
readLongstr
Public API - reads a long string.- Throws:
IOException
-
readShort
Public API - reads a short integer.- Throws:
IOException
-
readLong
Public API - reads an integer.- Throws:
IOException
-
readLonglong
Public API - reads a long integer.- Throws:
IOException
-
readTable
Reads a table argument from a given stream. Also called byContentHeaderPropertyReader
.- Throws:
IOException
-
readFieldValue
- Throws:
IOException
-
readUnsignedInt
Read an unsigned int- Throws:
IOException
-
readArray
Read a field-array- Throws:
IOException
-
readTable
Public API - reads a table.- Throws:
IOException
-
readOctet
Public API - reads an octet.- Throws:
IOException
-
readTimestamp
Convenience method - reads a timestamp argument from the DataInputStream.- Throws:
IOException
-
readTimestamp
Public API - reads an timestamp.- Throws:
IOException
-