public class InputStreamBufferInput extends Object implements BufferInput
| Constructor and Description |
|---|
InputStreamBufferInput(DataInputStream is) |
InputStreamBufferInput(InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasRemaining()
Returns a boolean value indicating whether the input has bytes remaining.
|
BufferInput |
read(Buffer buffer)
Reads bytes into the given buffer.
|
BufferInput |
read(byte[] bytes)
Reads bytes into the given byte array.
|
BufferInput |
read(byte[] bytes,
long offset,
long length)
Reads bytes into the given byte array starting at current position up to the given length.
|
BufferInput |
read(Bytes bytes)
Reads bytes into the given byte array.
|
BufferInput |
read(Bytes bytes,
long offset,
long length)
Reads bytes into the given byte array starting at the current position.
|
boolean |
readBoolean()
Reads a 1 byte boolean from the buffer at the current position.
|
int |
readByte()
Reads a byte from the buffer at the current position.
|
char |
readChar()
Reads a 16-bit character from the buffer at the current position.
|
double |
readDouble()
Reads a double-precision 64-bit floating point number from the buffer at the current position.
|
float |
readFloat()
Reads a single-precision 32-bit floating point number from the buffer at the current position.
|
int |
readInt()
Reads a 32-bit signed integer from the buffer at the current position.
|
long |
readLong()
Reads a 64-bit signed integer from the buffer at the current position.
|
int |
readMedium()
Reads a 24-bit signed integer from the buffer at the current position.
|
short |
readShort()
Reads a 16-bit signed integer from the buffer at the current position.
|
String |
readString()
Reads a string from the buffer at the current position.
|
int |
readUnsignedByte()
Reads an unsigned byte from the buffer at the current position.
|
long |
readUnsignedInt()
Reads a 32-bit unsigned integer from the buffer at the current position.
|
int |
readUnsignedMedium()
Reads a 24-bit unsigned integer from the buffer at the current position.
|
int |
readUnsignedShort()
Reads a 16-bit unsigned integer from the buffer at the current position.
|
String |
readUTF8()
Reads a UTF-8 string from the buffer at the current position.
|
long |
remaining()
Returns the number of bytes remaining in the input.
|
BufferInput |
skip(long bytes)
Skips the given number of bytes in the input.
|
public InputStreamBufferInput(InputStream is)
public InputStreamBufferInput(DataInputStream is)
public long remaining()
BufferInputremaining in interface BufferInputpublic boolean hasRemaining()
BufferInputhasRemaining in interface BufferInputpublic BufferInput skip(long bytes)
BufferInputskip in interface BufferInputbytes - The number of bytes to attempt to skip.public BufferInput read(Bytes bytes)
BufferInputread in interface BufferInputbytes - The byte array into which to read bytes.public BufferInput read(byte[] bytes)
BufferInputread in interface BufferInputbytes - The byte array into which to read bytes.public BufferInput read(Bytes bytes, long offset, long length)
BufferInputread in interface BufferInputbytes - The byte array into which to read bytes.offset - The offset at which to write bytes into the given bufferpublic BufferInput read(byte[] bytes, long offset, long length)
BufferInputread in interface BufferInputbytes - The byte array into which to read bytes.offset - The offset at which to write bytes into the given bufferpublic BufferInput read(Buffer buffer)
BufferInputread in interface BufferInputbuffer - The buffer into which to read bytes.public int readByte()
BufferInputreadByte in interface BufferInputpublic int readUnsignedByte()
BufferInputreadUnsignedByte in interface BufferInputpublic char readChar()
BufferInputreadChar in interface BufferInputpublic short readShort()
BufferInputreadShort in interface BufferInputpublic int readUnsignedShort()
BufferInputreadUnsignedShort in interface BufferInputpublic int readMedium()
BufferInputreadMedium in interface BufferInputpublic int readUnsignedMedium()
BufferInputreadUnsignedMedium in interface BufferInputpublic int readInt()
BufferInputreadInt in interface BufferInputpublic long readUnsignedInt()
BufferInputreadUnsignedInt in interface BufferInputpublic long readLong()
BufferInputreadLong in interface BufferInputpublic float readFloat()
BufferInputreadFloat in interface BufferInputpublic double readDouble()
BufferInputreadDouble in interface BufferInputpublic boolean readBoolean()
BufferInputreadBoolean in interface BufferInputpublic String readString()
BufferInputreadString in interface BufferInputpublic String readUTF8()
BufferInputreadUTF8 in interface BufferInputpublic void close()
close in interface AutoCloseableclose in interface BufferInputCopyright © 2013–2015. All rights reserved.