public abstract class AbstractSocketStreamDecorationStrategy extends java.lang.Object implements SocketStreamDecorationStrategy
SocketStreamDecorationStrategy.Factory| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSocketStreamDecorationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeStream(java.io.InputStream stream)
Closes the stream.
|
protected void |
closeStream(java.io.OutputStream stream)
Closes the stream.
|
java.io.InputStream |
decorate(java.net.Socket socket,
java.io.InputStream stream)
Creates a decorated
InputStream. |
java.io.OutputStream |
decorate(java.net.Socket socket,
java.io.OutputStream stream)
Creates a decorated
OutputStream. |
protected void |
exceptionDuringStreamClose(java.io.InputStream stream,
java.lang.Exception e)
Called when an exception is thrown during a call to
closeStream. |
protected void |
exceptionDuringStreamClose(java.io.OutputStream stream,
java.lang.Exception e)
Called when an exception is thrown during a call to
closeStream. |
protected java.io.InputStream |
uncheckedDecorate(java.net.Socket socket,
java.io.InputStream stream)
Creates a decorated
InputStream. |
protected java.io.OutputStream |
uncheckedDecorate(java.net.Socket socket,
java.io.OutputStream stream)
Creates a decorated
OutputStream. |
protected AbstractSocketStreamDecorationStrategy()
public final 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 final 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.protected java.io.InputStream uncheckedDecorate(java.net.Socket socket,
java.io.InputStream stream)
throws java.io.IOException
InputStream.socket - the source of the original streamstream - the stream to be decoratedInputStream.java.io.IOException - if an I/O error occurs while creating the socket.protected java.io.OutputStream uncheckedDecorate(java.net.Socket socket,
java.io.OutputStream stream)
throws java.io.IOException
OutputStream.socket - the source of the original streamstream - the stream to be decoratedOutputStream.java.io.IOException - if an I/O error occurs while creating the socket.protected void closeStream(java.io.InputStream stream)
exceptionDuringStreamClose is called.stream - the stream to be closedprotected void closeStream(java.io.OutputStream stream)
exceptionDuringStreamClose is called.stream - the stream to be closedprotected void exceptionDuringStreamClose(java.io.InputStream stream,
java.lang.Exception e)
closeStream.stream - the stream the threw the exceptione - the exception thrownprotected void exceptionDuringStreamClose(java.io.OutputStream stream,
java.lang.Exception e)
closeStream.stream - the stream the threw the exceptione - the exception thrown