Class PTCPOutputStream
java.lang.Object
java.io.OutputStream
ecmwf.common.transport.ptcp.psocket.PTCPOutputStream
-
Constructor Summary
ConstructorsConstructorDescriptionPTCPOutputStream
(OutputStream[] streams) Default constructor Construct an empty parallel output stream. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this output stream and releases any system resources associated with this stream.boolean
finished()
Check whether we are finished or not.void
flush()
Flushes this output stream and forces any buffered output bytes to be written out.void
wakeUp()
Wake up.void
write
(byte[] b) Writes b.length bytes from the specified byte array to this output stream.void
write
(byte[] b, int off, int len) Write.void
write
(int b) Writes the specified byte to this output stream.Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
PTCPOutputStream
Default constructor Construct an empty parallel output stream.- Parameters:
streams
- the streams
-
-
Method Details
-
close
Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
finished
public boolean finished()Check whether we are finished or not.- Returns:
- true, if successful
-
flush
Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
write
Write.- Overrides:
write
in classOutputStream
- Throws:
IOException
-
wakeUp
public void wakeUp()Wake up. -
write
Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored. This single byte will travel on command stream- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length). This is a parallel write.- Overrides:
write
in classOutputStream
- Throws:
IOException
-