Class MethodArgumentReader

java.lang.Object
com.rabbitmq.client.impl.MethodArgumentReader

public class MethodArgumentReader extends Object
Parses AMQP wire-protocol Method arguments from a DataInputStream. Methods on this object are usually called from generated code.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    If we are reading one or more bits, holds the current packed collection of bits
    private final ValueReader
    The stream we are reading from.
    private int
    If we are reading one or more bits, keeps track of which bit position we will read from next.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a MethodArgumentReader from the given ValueReader.
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    Resets the bit group accumulator variables when some non-bit argument value is to be read.
    final boolean
    Public API - reads a bit/boolean argument.
    final int
    Public API - reads an integer argument.
    final long
    Public API - reads a long integer argument.
    Public API - reads a long string argument.
    final int
    Public API - reads an octet argument.
    final int
    Public API - reads a short integer argument.
    final String
    Public API - reads a short string argument.
    Public API - reads a table argument.
    final Date
    Public API - reads an timestamp argument.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • MethodArgumentReader

      public MethodArgumentReader(ValueReader in)
      Construct a MethodArgumentReader from the given ValueReader.
  • Method Details

    • clearBits

      private void clearBits()
      Resets the bit group accumulator variables when some non-bit argument value is to be read.
    • readShortstr

      public final String readShortstr() throws IOException
      Public API - reads a short string argument.
      Throws:
      IOException
    • readLongstr

      public final LongString readLongstr() throws IOException
      Public API - reads a long string argument.
      Throws:
      IOException
    • readShort

      public final int readShort() throws IOException
      Public API - reads a short integer argument.
      Throws:
      IOException
    • readLong

      public final int readLong() throws IOException
      Public API - reads an integer argument.
      Throws:
      IOException
    • readLonglong

      public final long readLonglong() throws IOException
      Public API - reads a long integer argument.
      Throws:
      IOException
    • readBit

      public final boolean readBit() throws IOException
      Public API - reads a bit/boolean argument.
      Throws:
      IOException
    • readTable

      public final Map<String,Object> readTable() throws IOException
      Public API - reads a table argument.
      Throws:
      IOException
    • readOctet

      public final int readOctet() throws IOException
      Public API - reads an octet argument.
      Throws:
      IOException
    • readTimestamp

      public final Date readTimestamp() throws IOException
      Public API - reads an timestamp argument.
      Throws:
      IOException