Class SimpleDataInput

All Implemented Interfaces:
Closeable, DataInput, AutoCloseable, ByteInput
Direct Known Subclasses:
AbstractObjectInput

public class SimpleDataInput extends ByteInputStream implements DataInput
A simple base implementation of DataInput which wraps a ByteInput. This implementation maintains an internal buffer.
  • Field Details

    • buffer

      protected final byte[] buffer
      The internal buffer.
    • position

      protected int position
      The buffer position.
    • limit

      protected int limit
      The buffer limit.
  • Constructor Details

    • SimpleDataInput

      public SimpleDataInput(int bufferSize)
      Construct a new instance which wraps nothing.
      Parameters:
      bufferSize - the internal buffer size to use
    • SimpleDataInput

      public SimpleDataInput(int bufferSize, ByteInput byteInput)
      Construct a new instance.
      Parameters:
      bufferSize - the internal buffer size to use
      byteInput - the byte input to initially wrap
    • SimpleDataInput

      public SimpleDataInput(ByteInput byteInput)
      Construct a new instance. A default buffer size is used.
      Parameters:
      byteInput - the byte input to initially wrap
  • Method Details