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, wrappublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic byte readByte()
throws java.io.IOException
StreamInputreadByte in class StreamInputjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic void readBytes(byte[] b,
int offset,
int len)
throws java.io.IOException
StreamInputreadBytes in class StreamInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class StreamInputjava.io.IOExceptionprotected void ensureCanReadBytes(int length)
throws java.io.EOFException
StreamInputEOFException 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 StreamInputjava.io.EOFExceptionpublic void mark(int readlimit)
mark in class java.io.InputStreampublic boolean markSupported()
markSupported in class java.io.InputStreampublic void close()
throws java.io.IOException
StreamInputclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class StreamInputjava.io.IOException