public class InputChunked extends Input
Input
that reads lengths and chunks of data from another OutputStream, allowing chunks to be skipped.buffer, capacity, chars, inputStream, limit, position, total, varEncoding
Constructor and Description |
---|
InputChunked() |
InputChunked(java.io.InputStream inputStream) |
InputChunked(java.io.InputStream inputStream,
int bufferSize) |
InputChunked(int bufferSize) |
Modifier and Type | Method and Description |
---|---|
protected int |
fill(byte[] buffer,
int offset,
int count)
Fills the buffer with more bytes.
|
void |
nextChunk()
Advances the stream to the next chunk.
|
void |
reset()
Sets the position and total to zero.
|
void |
setBuffer(byte[] bytes,
int offset,
int count)
Sets a new buffer to read from.
|
void |
setInputStream(java.io.InputStream inputStream)
Sets an InputStream to read from when data in the buffer is exhausted.
|
available, canReadInt, canReadLong, canReadVarInt, canReadVarLong, close, end, getBuffer, getInputStream, getVariableLengthEncoding, limit, optional, position, read, read, read, readBoolean, readBooleans, readByte, readBytes, readBytes, readBytes, readByteUnsigned, readChar, readChars, readDouble, readDoubles, readFloat, readFloats, readInt, readInt, readInts, readInts, readLong, readLong, readLongs, readLongs, readShort, readShorts, readShortUnsigned, readString, readStringBuilder, readVarDouble, readVarFloat, readVarInt, readVarIntFlag, readVarIntFlag, readVarLong, require, setBuffer, setLimit, setPosition, setTotal, setVariableLengthEncoding, skip, skip, total
public InputChunked()
Input.Input()
public InputChunked(int bufferSize)
Input.Input(int)
public InputChunked(java.io.InputStream inputStream)
Input.Input(InputStream)
public InputChunked(java.io.InputStream inputStream, int bufferSize)
Input.Input(InputStream, int)
public void setInputStream(java.io.InputStream inputStream)
Input
setInputStream
in class Input
inputStream
- May be null.public void setBuffer(byte[] bytes, int offset, int count)
Input
InputStream
is set to null.public void reset()
Input
reset
in interface Pool.Poolable
reset
in class Input
protected int fill(byte[] buffer, int offset, int count) throws KryoException
Input
InputStream
, if set.
Can be overridden to fill the bytes from another source.fill
in class Input
KryoException
public void nextChunk()
Copyright © 2019. All Rights Reserved.