public final class CompositeSocketStreamDecorationStrategy extends java.lang.Object implements SocketStreamDecorationStrategy
SocketStreamDecorationStrategy.Factory| Constructor and Description |
|---|
CompositeSocketStreamDecorationStrategy(SocketStreamDecorationStrategy strategy1,
SocketStreamDecorationStrategy strategy2)
Constructs a composite strategy from two other strategies.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
decorate(java.net.Socket socket,
java.io.InputStream stream)
Creates a decorated
InputStream, by first applying
decoration strategy1 then applying strategy2 to the resulting stream. |
java.io.OutputStream |
decorate(java.net.Socket socket,
java.io.OutputStream stream)
Creates a decorated
InputStream, by first applying
decoration strategy1 then applying strategy2 to the resulting stream. |
public CompositeSocketStreamDecorationStrategy(SocketStreamDecorationStrategy strategy1, SocketStreamDecorationStrategy strategy2)
strategy1 - the first strategy to applystrategy2 - the second strategy to applypublic java.io.InputStream decorate(java.net.Socket socket,
java.io.InputStream stream)
throws java.io.IOException
InputStream, by first applying
decoration strategy1 then applying strategy2 to the resulting stream.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
InputStream, by first applying
decoration strategy1 then applying strategy2 to the resulting stream.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.