Interface HttpDecoderInput

All Superinterfaces:
AutoCloseable, SafeCloseable

@UnstableApi
public interface HttpDecoderInput
extends SafeCloseable
An input of HttpDecoder which is used to read a stream of HttpData.
  • Method Summary

    Modifier and Type Method Description
    byte getByte​(int index)
    Returns a byte at the specified absolute index in this HttpDecoderInput.
    int readableBytes()
    Returns the number of readable bytes.
    byte readByte()
    Reads a byte from the readable bytes.
    ByteBuf readBytes​(int length)
    Reads a newly retained slice of this ByteBuf from the readable bytes.
    int readInt()
    Reads a 32-bit integer from the readable bytes.
    default short readUnsignedByte()
    Reads an unsigned byte from the readable bytes.
    void skipBytes​(int length)
    Skips bytes of the specified length in this HttpDecoderInput.

    Methods inherited from interface com.linecorp.armeria.common.util.SafeCloseable

    close
  • Method Details

    • readableBytes

      int readableBytes()
      Returns the number of readable bytes.
    • readByte

      byte readByte()
      Reads a byte from the readable bytes.
    • readUnsignedByte

      default short readUnsignedByte()
      Reads an unsigned byte from the readable bytes.
    • readInt

      int readInt()
      Reads a 32-bit integer from the readable bytes.
    • readBytes

      ByteBuf readBytes​(int length)
      Reads a newly retained slice of this ByteBuf from the readable bytes.
      Throws:
      IllegalStateException - if the specified length is greater than readableBytes()
    • getByte

      byte getByte​(int index)
      Returns a byte at the specified absolute index in this HttpDecoderInput.
      Throws:
      IllegalStateException - if the specified index is greater than readableBytes()
    • skipBytes

      void skipBytes​(int length)
      Skips bytes of the specified length in this HttpDecoderInput.
      Throws:
      IllegalStateException - if the specified length is greater than readableBytes()