public class ByteBufferStreamInput extends StreamInput
Constructor and Description |
---|
ByteBufferStreamInput(java.nio.ByteBuffer buffer) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close()
Closes the stream to further operations.
|
protected void |
ensureCanReadBytes(int length)
This method throws an
EOFException if the given number of bytes can not be read from the this stream. |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
byte |
readByte()
Reads and returns a single byte.
|
void |
readBytes(byte[] b,
int offset,
int len)
Reads a specified number of bytes into an array at the specified offset.
|
void |
reset() |
long |
skip(long n) |
getVersion, readArray, readBoolean, readByteArray, readBytesRef, readBytesRef, readBytesReference, readBytesReference, readDouble, readDoubleArray, readEnum, readException, readFloat, readFloatArray, readFully, readGenericValue, readGeoPoint, readInt, readIntArray, readList, readLong, readLongArray, readMap, readMap, readMapOfLists, readNamedWriteable, readNamedWriteable, readNamedWriteableList, readOptionalArray, readOptionalBoolean, readOptionalBytesReference, readOptionalDouble, readOptionalFloat, readOptionalLong, readOptionalNamedWriteable, readOptionalStreamable, readOptionalString, readOptionalStringArray, readOptionalText, readOptionalTimeZone, readOptionalVInt, readOptionalWriteable, readShort, readStreamableList, readString, readStringArray, readText, readTimeZone, readVInt, readVIntArray, readVLong, readVLongArray, readZLong, setVersion, wrap, wrap
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public byte readByte() throws java.io.IOException
StreamInput
readByte
in class StreamInput
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
java.io.IOException
public void readBytes(byte[] b, int offset, int len) throws java.io.IOException
StreamInput
readBytes
in class StreamInput
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readjava.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class StreamInput
java.io.IOException
protected void ensureCanReadBytes(int length) throws java.io.EOFException
StreamInput
EOFException
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.ensureCanReadBytes
in class StreamInput
java.io.EOFException
public void mark(int readlimit)
mark
in class java.io.InputStream
public boolean markSupported()
markSupported
in class java.io.InputStream
public void close() throws java.io.IOException
StreamInput
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class StreamInput
java.io.IOException