public interface StreamFactory
Modifier and Type | Method and Description |
---|---|
Input |
getInput()
Creates an uninitialized Input.
|
Input |
getInput(byte[] buffer)
Creates a new Input for reading from a byte array.
|
Input |
getInput(byte[] buffer,
int offset,
int count)
Creates a new Input for reading from a byte array.
|
Input |
getInput(InputStream inputStream)
Creates a new Input for reading from an InputStream with a buffer size of 4096.
|
Input |
getInput(InputStream inputStream,
int bufferSize)
Creates a new Input for reading from an InputStream.
|
Input |
getInput(int bufferSize)
Creates a new Input for reading from a byte array.
|
Output |
getOutput()
Creates an uninitialized Output.
|
Output |
getOutput(byte[] buffer)
Creates a new Output for writing to a byte array.
|
Output |
getOutput(byte[] buffer,
int maxBufferSize)
Creates a new Output for writing to a byte array.
|
Output |
getOutput(int bufferSize)
Creates a new Output for writing to a byte array.
|
Output |
getOutput(int bufferSize,
int maxBufferSize)
Creates a new Output for writing to a byte array.
|
Output |
getOutput(OutputStream outputStream)
Creates a new Output for writing to an OutputStream.
|
Output |
getOutput(OutputStream outputStream,
int bufferSize)
Creates a new Output for writing to an OutputStream.
|
void |
setKryo(Kryo kryo) |
Input getInput()
Input getInput(int bufferSize)
bufferSize
- The size of the buffer. An exception is thrown if more bytes than this are read.Input getInput(byte[] buffer)
buffer
- An exception is thrown if more bytes than this are read.Input getInput(byte[] buffer, int offset, int count)
buffer
- An exception is thrown if more bytes than this are read.Input getInput(InputStream inputStream)
Input getInput(InputStream inputStream, int bufferSize)
Output getOutput()
Output.setBuffer(byte[], int)
must be called before the Output is used.Output getOutput(int bufferSize)
bufferSize
- The initial and maximum size of the buffer. An exception is thrown if this size is exceeded.Output getOutput(int bufferSize, int maxBufferSize)
bufferSize
- The initial size of the buffer.maxBufferSize
- The buffer is doubled as needed until it exceeds maxBufferSize and an exception is thrown. Can be -1
for no maximum.Output getOutput(byte[] buffer)
Output.setBuffer(byte[])
Output getOutput(byte[] buffer, int maxBufferSize)
Output.setBuffer(byte[], int)
Output getOutput(OutputStream outputStream)
Output getOutput(OutputStream outputStream, int bufferSize)
void setKryo(Kryo kryo)
Copyright © 2015. All rights reserved.