public class RiverOutputStream
extends java.io.OutputStream
implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this resource, relinquishing any underlying resources.
|
boolean |
isClosed()
Returns the closed state of this stream.
|
void |
write(byte... b)
Writes the specified array of bytes to this output stream. The
general contract for
write is that all the bytes are written to
the output stream. |
void |
write(Iceberg ib)
Writes the specified Iceberg to this output stream. The general
contract for
write is that all the bytes are written to the
output stream. |
void |
write(int b)
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. |
void |
writeBoolean(boolean b)
Writes the specified boolean flag to this output stream.
|
void |
writeString(String s)
Writes the specified ASCIIZ string to this output stream, with an ASCIIZ
(byte 0) added to the end to terminate the String.
|
void |
writeStrings(String... s)
Writes multiple ASCIIZ strings to this output stream, with an ASCIIZ (byte
0) added to the end of each String to terminate it.
|
public void close()
close
in interface java.io.Closeable
close
in interface AutoCloseable
close
in class java.io.OutputStream
public boolean isClosed()
public void write(byte... b) throws java.io.IOException
write
is that all the bytes are written to
the output stream.write
in class java.io.OutputStream
b
- The bytes
to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closedpublic void write(Iceberg ib) throws java.io.IOException
write
is that all the bytes are written to the
output stream.ib
- The Iceberg
to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closedpublic void write(int b) throws java.io.IOException
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.write
in class java.io.OutputStream
b
- The byte
to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closedpublic void writeBoolean(boolean b) throws java.io.IOException
b
- The boolean
flag to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closedpublic void writeString(String s) throws java.io.IOException
s
- The String
to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closedpublic void writeStrings(String... s) throws java.io.IOException
s
- The Strings
to writejava.io.IOException
- If an I/O error occurs; in particular, an
IOException
may be thrown if the output stream has been closed