public class FastestStreamFactory extends Object implements StreamFactory
| Constructor and Description |
|---|
FastestStreamFactory() |
| 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) |
public Input getInput()
StreamFactorygetInput in interface StreamFactorypublic Input getInput(int bufferSize)
StreamFactorygetInput in interface StreamFactorybufferSize - The size of the buffer. An exception is thrown if more bytes than this are read.public Input getInput(byte[] buffer)
StreamFactorygetInput in interface StreamFactorybuffer - An exception is thrown if more bytes than this are read.public Input getInput(byte[] buffer, int offset, int count)
StreamFactorygetInput in interface StreamFactorybuffer - An exception is thrown if more bytes than this are read.public Input getInput(InputStream inputStream)
StreamFactorygetInput in interface StreamFactorypublic Input getInput(InputStream inputStream, int bufferSize)
StreamFactorygetInput in interface StreamFactorypublic Output getOutput()
StreamFactoryOutput.setBuffer(byte[], int) must be called before the Output is used.getOutput in interface StreamFactorypublic Output getOutput(int bufferSize)
StreamFactorygetOutput in interface StreamFactorybufferSize - The initial and maximum size of the buffer. An exception is thrown if this size is exceeded.public Output getOutput(int bufferSize, int maxBufferSize)
StreamFactorygetOutput in interface StreamFactorybufferSize - 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.public Output getOutput(byte[] buffer)
StreamFactorygetOutput in interface StreamFactoryOutput.setBuffer(byte[])public Output getOutput(byte[] buffer, int maxBufferSize)
StreamFactorygetOutput in interface StreamFactoryOutput.setBuffer(byte[], int)public Output getOutput(OutputStream outputStream)
StreamFactorygetOutput in interface StreamFactorypublic Output getOutput(OutputStream outputStream, int bufferSize)
StreamFactorygetOutput in interface StreamFactorypublic void setKryo(Kryo kryo)
setKryo in interface StreamFactoryCopyright © 2023. All rights reserved.