Package com.rabbitmq.client.impl
Class MethodArgumentReader
- java.lang.Object
-
- com.rabbitmq.client.impl.MethodArgumentReader
-
public class MethodArgumentReader extends java.lang.ObjectParses AMQP wire-protocolMethodarguments from a DataInputStream. Methods on this object are usually called from generated code.
-
-
Field Summary
Fields Modifier and Type Field Description private intbitsIf we are reading one or more bits, holds the current packed collection of bitsprivate ValueReaderinThe stream we are reading from.private intnextBitMaskIf we are reading one or more bits, keeps track of which bit position we will read from next.
-
Constructor Summary
Constructors Constructor Description MethodArgumentReader(ValueReader in)Construct a MethodArgumentReader from the givenValueReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidclearBits()Resets the bit group accumulator variables when some non-bit argument value is to be read.booleanreadBit()Public API - reads a bit/boolean argument.intreadLong()Public API - reads an integer argument.longreadLonglong()Public API - reads a long integer argument.LongStringreadLongstr()Public API - reads a long string argument.intreadOctet()Public API - reads an octet argument.intreadShort()Public API - reads a short integer argument.java.lang.StringreadShortstr()Public API - reads a short string argument.java.util.Map<java.lang.String,java.lang.Object>readTable()Public API - reads a table argument.java.util.DatereadTimestamp()Public API - reads an timestamp argument.
-
-
-
Field Detail
-
in
private final ValueReader in
The stream we are reading from.
-
bits
private int bits
If we are reading one or more bits, holds the current packed collection of bits
-
nextBitMask
private int nextBitMask
If we are reading one or more bits, keeps track of which bit position we will read from next. (reading least to most significant order)
-
-
Constructor Detail
-
MethodArgumentReader
public MethodArgumentReader(ValueReader in)
Construct a MethodArgumentReader from the givenValueReader.
-
-
Method Detail
-
clearBits
private void clearBits()
Resets the bit group accumulator variables when some non-bit argument value is to be read.
-
readShortstr
public final java.lang.String readShortstr() throws java.io.IOExceptionPublic API - reads a short string argument.- Throws:
java.io.IOException
-
readLongstr
public final LongString readLongstr() throws java.io.IOException
Public API - reads a long string argument.- Throws:
java.io.IOException
-
readShort
public final int readShort() throws java.io.IOExceptionPublic API - reads a short integer argument.- Throws:
java.io.IOException
-
readLong
public final int readLong() throws java.io.IOExceptionPublic API - reads an integer argument.- Throws:
java.io.IOException
-
readLonglong
public final long readLonglong() throws java.io.IOExceptionPublic API - reads a long integer argument.- Throws:
java.io.IOException
-
readBit
public final boolean readBit() throws java.io.IOExceptionPublic API - reads a bit/boolean argument.- Throws:
java.io.IOException
-
readTable
public final java.util.Map<java.lang.String,java.lang.Object> readTable() throws java.io.IOExceptionPublic API - reads a table argument.- Throws:
java.io.IOException
-
readOctet
public final int readOctet() throws java.io.IOExceptionPublic API - reads an octet argument.- Throws:
java.io.IOException
-
readTimestamp
public final java.util.Date readTimestamp() throws java.io.IOExceptionPublic API - reads an timestamp argument.- Throws:
java.io.IOException
-
-