public class JSimpleOutputStreamOnJavaStream extends OutputStream
Constructor and Description |
---|
JSimpleOutputStreamOnJavaStream(java.io.OutputStream javaOutputStream) |
JSimpleOutputStreamOnJavaStream(java.io.OutputStream javaOutputStream,
boolean ignoreClose)
Create a JSimple stream that wraps the specified Java OutputStream.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doClose()
This is an internal method, implemented by subclasses to close any resources associated with the stream.
|
void |
flush()
Flushes this stream.
|
void |
write(byte[] b)
Writes the entire contents of the byte array
buffer to this stream. |
void |
write(byte[] b,
int offset,
int length)
Writes
count bytes from the byte array buffer starting at position offset to this
stream. |
void |
write(int oneByte)
Writes a single byte to this stream.
|
close, getClosedListener, setClosedListener, write, writeLatin1EncodedString, writeUtf8EncodedString
public JSimpleOutputStreamOnJavaStream(java.io.OutputStream javaOutputStream)
public JSimpleOutputStreamOnJavaStream(java.io.OutputStream javaOutputStream, boolean ignoreClose)
javaOutputStream
- Java OutputStreamignoreClose
- whether or not to close the underlying stream when this stream is closedpublic void write(int oneByte)
OutputStream
oneByte
is written to
the stream.write
in class OutputStream
oneByte
- the byte to be written.public void write(byte[] b)
OutputStream
buffer
to this stream.write
in class OutputStream
b
- the buffer to be writtenpublic void write(byte[] b, int offset, int length)
OutputStream
count
bytes from the byte array buffer
starting at position offset
to this
stream.write
in class OutputStream
b
- the buffer to be writtenoffset
- the start position in buffer
from where to get byteslength
- the number of bytes from buffer
to write to this streampublic void flush()
OutputStream
flush
in class OutputStream
protected void doClose()
OutputStream
doClose
in class OutputStream