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 TypeMethodDescriptionvoidclose()Closes this output stream and releases any system resources associated with this stream.booleanfinished()Check whether we are finished or not.voidflush()Flushes this output stream and forces any buffered output bytes to be written out.voidwakeUp()Wake up.voidwrite(byte[] b) Writes b.length bytes from the specified byte array to this output stream.voidwrite(byte[] b, int off, int len) Write.voidwrite(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein 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:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
Write.- Overrides:
writein 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:
writein 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:
writein classOutputStream- Throws:
IOException
-