Class ByteBufferStreamInput

org.elasticsearch.common.io.stream.StreamInput
org.elasticsearch.common.io.stream.ByteBufferStreamInput
All Implemented Interfaces:
,

public class ByteBufferStreamInput extends StreamInput
  • Constructor Details

    • ByteBufferStreamInput

      public ByteBufferStreamInput( buffer)
  • Method Details

    • read

      public int read() throws
      Specified by:
       in class 
      Throws:
    • readByte

      public byte readByte() throws
      Description copied from class: StreamInput
      Reads and returns a single byte.
      Specified by:
      readByte in class StreamInput
      Throws:
    • read

      public int read(byte[] b, int off, int len) throws
      Overrides:
       in class 
      Throws:
    • skip

      public long skip(long n) throws
      Overrides:
       in class 
      Throws:
    • readBytes

      public void readBytes(byte[] b, int offset, int len) throws
      Description copied from class: StreamInput
      Reads a specified number of bytes into an array at the specified offset.
      Specified by:
      readBytes in class StreamInput
      Parameters:
      b - the array to read bytes into
      offset - the offset in the array to start storing bytes
      len - the number of bytes to read
      Throws:
    • readShort

      public short readShort() throws
      Overrides:
      readShort in class StreamInput
      Throws:
    • readInt

      public int readInt() throws
      Description copied from class: StreamInput
      Reads four bytes and returns an int.
      Overrides:
      readInt in class StreamInput
      Throws:
    • readLong

      public long readLong() throws
      Description copied from class: StreamInput
      Reads eight bytes and returns a long.
      Overrides:
      readLong in class StreamInput
      Throws:
    • reset

      public void reset() throws
      Overrides:
       in class 
      Throws:
    • available

      public int available() throws
      Specified by:
      available in class StreamInput
      Throws:
    • ensureCanReadBytes

      protected void ensureCanReadBytes(int length) throws
      Description copied from class: StreamInput
      This method throws an if the given number of bytes can not be read from the this stream. This method might be a no-op depending on the underlying implementation if the information of the remaining bytes is not present.
      Specified by:
      ensureCanReadBytes in class StreamInput
      Throws:
    • mark

      public void mark(int readlimit)
      Overrides:
       in class 
    • markSupported

      public boolean markSupported()
      Overrides:
       in class 
    • close

      public void close() throws
      Description copied from class: StreamInput
      Closes the stream to further operations.
      Specified by:
       in interface 
      Specified by:
       in interface 
      Specified by:
      close in class StreamInput
      Throws: