Interface PackInput

All Known Implementing Classes:
ByteBufInput

public interface PackInput
This is what PackStream uses to ingest data, implement this on top of any data source of your choice to deserialize the stream with PackStream.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Get the next byte without forwarding the internal pointer
    byte
    Consume one byte
    void
    readBytes(byte[] into, int offset, int toRead)
    Consume a specified number of bytes
    double
    Consume an 8-byte IEEE 754 "double format" floating-point number
    int
    Consume a 4-byte signed integer
    long
    Consume an 8-byte signed integer
    short
    Consume a 2-byte signed integer
  • Method Details

    • readByte

      byte readByte() throws IOException
      Consume one byte
      Throws:
      IOException
    • readShort

      short readShort() throws IOException
      Consume a 2-byte signed integer
      Throws:
      IOException
    • readInt

      int readInt() throws IOException
      Consume a 4-byte signed integer
      Throws:
      IOException
    • readLong

      long readLong() throws IOException
      Consume an 8-byte signed integer
      Throws:
      IOException
    • readDouble

      double readDouble() throws IOException
      Consume an 8-byte IEEE 754 "double format" floating-point number
      Throws:
      IOException
    • readBytes

      void readBytes(byte[] into, int offset, int toRead) throws IOException
      Consume a specified number of bytes
      Throws:
      IOException
    • peekByte

      byte peekByte() throws IOException
      Get the next byte without forwarding the internal pointer
      Throws:
      IOException