Package VASSAL.tools.io
Class InputOutputStreamPump
java.lang.Object
VASSAL.tools.io.InputOutputStreamPump
- All Implemented Interfaces:
Runnable
,InputStreamPump
,OutputStreamPump
Pumps an
InputStream
to an OutputStream
.- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Field Summary
Modifier and TypeFieldDescriptionprotected InputStream
protected final EventListener
<IOException> protected OutputStream
protected boolean
-
Constructor Summary
ConstructorDescriptionCreates anInputOutputStreamPump
.InputOutputStreamPump
(InputStream in, OutputStream out) Creates anInputOutputStreamPump
.InputOutputStreamPump
(InputStream in, OutputStream out, EventListener<IOException> ioexListener) Creates anInputOutputStreamPump
.InputOutputStreamPump
(EventListener<IOException> ioexListener) Creates anInputOutputStreamPump
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
void
Sets the input stream.void
Sets the output stream.
-
Field Details
-
in
-
out
-
running
protected volatile boolean running -
ioexListener
-
-
Constructor Details
-
InputOutputStreamPump
public InputOutputStreamPump()Creates anInputOutputStreamPump
. -
InputOutputStreamPump
Creates anInputOutputStreamPump
.- Parameters:
ioexListener
- the exception listener
-
InputOutputStreamPump
Creates anInputOutputStreamPump
.- Parameters:
in
- the input streamout
- the output stream
-
InputOutputStreamPump
public InputOutputStreamPump(InputStream in, OutputStream out, EventListener<IOException> ioexListener) Creates anInputOutputStreamPump
.- Parameters:
in
- the input streamout
- the output streamioexListener
- the exception listener
-
-
Method Details
-
setInputStream
Sets the input stream.- Specified by:
setInputStream
in interfaceInputStreamPump
- Parameters:
in
- the input stream- Throws:
UnsupportedOperationException
- if called after the pump is started
-
setOutputStream
Sets the output stream.- Specified by:
setOutputStream
in interfaceOutputStreamPump
- Parameters:
out
- the output stream- Throws:
UnsupportedOperationException
- if called after the pump is started
-
run
-