|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A strategy for decorating sockets streams.
Nested Class Summary | |
static interface |
SocketStreamDecorationStrategy.Factory
Factory interface for creating instances of SocketStreamDecorationStrategy . |
Method Summary | |
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 . |
Method Detail |
public java.io.InputStream decorate(java.net.Socket socket, java.io.InputStream stream) throws java.io.IOException
InputStream
.
Note that the implementation which throws an exception must also
close the original stream.
socket
- the source of the original streamstream
- the stream to be decorated
InputStream
.
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
.
Note that the implementation which throws an exception must also
close the original stream.
socket
- the source of the original streamstream
- the stream to be decorated
OutputStream
.
java.io.IOException
- if an I/O error occurs while creating the socket.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |