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()
StreamFactory
getInput
in interface StreamFactory
public Input getInput(int bufferSize)
StreamFactory
getInput
in interface StreamFactory
bufferSize
- The size of the buffer. An exception is thrown if more bytes than this are read.public Input getInput(byte[] buffer)
StreamFactory
getInput
in interface StreamFactory
buffer
- An exception is thrown if more bytes than this are read.public Input getInput(byte[] buffer, int offset, int count)
StreamFactory
getInput
in interface StreamFactory
buffer
- An exception is thrown if more bytes than this are read.public Input getInput(InputStream inputStream)
StreamFactory
getInput
in interface StreamFactory
public Input getInput(InputStream inputStream, int bufferSize)
StreamFactory
getInput
in interface StreamFactory
public Output getOutput()
StreamFactory
Output.setBuffer(byte[], int)
must be called before the Output is used.getOutput
in interface StreamFactory
public Output getOutput(int bufferSize)
StreamFactory
getOutput
in interface StreamFactory
bufferSize
- The initial and maximum size of the buffer. An exception is thrown if this size is exceeded.public Output getOutput(int bufferSize, int maxBufferSize)
StreamFactory
getOutput
in interface StreamFactory
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.public Output getOutput(byte[] buffer)
StreamFactory
getOutput
in interface StreamFactory
Output.setBuffer(byte[])
public Output getOutput(byte[] buffer, int maxBufferSize)
StreamFactory
getOutput
in interface StreamFactory
Output.setBuffer(byte[], int)
public Output getOutput(OutputStream outputStream)
StreamFactory
getOutput
in interface StreamFactory
public Output getOutput(OutputStream outputStream, int bufferSize)
StreamFactory
getOutput
in interface StreamFactory
public void setKryo(Kryo kryo)
setKryo
in interface StreamFactory
Copyright © 2018. All rights reserved.