Class Binary8TypeDecoder

    • Constructor Detail

      • Binary8TypeDecoder

        public Binary8TypeDecoder()
    • Method Detail

      • getTypeCode

        public int getTypeCode()
        Returns:
        the AMQP Encoding Code that this primitive type decoder can read.
      • readSize

        public int readSize​(ProtonBuffer buffer)
                     throws DecodeException
        Description copied from interface: BinaryTypeDecoder
        Reads the encoded size value for the encoded binary payload and returns it. The read is destructive and the TypeDecoder read methods cannot be called after this unless the ProtonBuffer is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given ProtonBuffer.
        Specified by:
        readSize in interface BinaryTypeDecoder
        Specified by:
        readSize in class AbstractBinaryTypeDecoder
        Parameters:
        buffer - the buffer from which the binary encoded size should be read.
        Returns:
        the size of the binary payload that is encoded in the given ProtonBuffer.
        Throws:
        DecodeException - if an error occurs while reading the binary size.
      • readSize

        public int readSize​(java.io.InputStream stream)
        Description copied from interface: BinaryTypeDecoder
        Reads the encoded size value for the encoded binary payload and returns it. The read is destructive and the TypeDecoder read methods cannot be called after this unless the InputStream is reset via a position marker. This method can be useful when the caller intends to manually read the binary payload from the given InputStream.
        Specified by:
        readSize in interface BinaryTypeDecoder
        Specified by:
        readSize in class AbstractBinaryTypeDecoder
        Parameters:
        stream - the stream from which the binary encoded size should be read.
        Returns:
        the size of the binary payload that is encoded in the given InputStream.