public final class BufferingSocketStreamDecorationStrategy extends java.lang.Object implements SocketStreamDecorationStrategy
| Modifier and Type | Class and Description |
|---|---|
static class |
BufferingSocketStreamDecorationStrategy.Factory
Factory for creating instances of
BufferingSocketStreamDecorationStrategy. |
| Constructor and Description |
|---|
BufferingSocketStreamDecorationStrategy(int inputBufferSize,
int outputBufferSize)
Constructs a decoration strategy using the specified buffer sizes.
|
public BufferingSocketStreamDecorationStrategy(int inputBufferSize,
int outputBufferSize)
inputBufferSize - the size of input buffer to be usedoutputBufferSize - the size of the output buffer to be usedpublic java.io.InputStream decorate(java.net.Socket socket,
java.io.InputStream stream)
throws java.io.IOException
InputStream.decorate in interface SocketStreamDecorationStrategysocket - the source of the original streamstream - the stream to be decoratedInputStream.java.io.IOException - if an I/O error occurs while creating the socket.public java.io.OutputStream decorate(java.net.Socket socket,
java.io.OutputStream stream)
throws java.io.IOException
OutputStream.decorate in interface SocketStreamDecorationStrategysocket - the source of the original streamstream - the stream to be decoratedOutputStream.java.io.IOException - if an I/O error occurs while creating the socket.