Closeable
, Flushable
, AutoCloseable
public class WriterOutputStream extends OutputStream
Writer
in an OutputStream
.
Instances of this class are not thread-safe.
NOTE: This class is probably not the right way of solving your problem,
however it might prove useful in JSPs etc.
If possible, it's always better to use the Writer
's underlying
OutputStream
, or wrap it's native backing.
Modifier and Type | Field | Description |
---|---|---|
protected com.twelvemonkeys.io.WriterOutputStream.Decoder |
decoder |
|
protected Writer |
writer |
Constructor | Description |
---|---|
WriterOutputStream(Writer pWriter) |
|
WriterOutputStream(Writer pWriter,
String pCharset) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
flush() |
|
static void |
main(String[] pArgs) |
|
void |
write(byte[] pBytes) |
|
void |
write(byte[] pBytes,
int pOffset,
int pLength) |
|
void |
write(int pByte) |
protected Writer writer
protected final com.twelvemonkeys.io.WriterOutputStream.Decoder decoder
public WriterOutputStream(Writer pWriter)
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public final void write(byte[] pBytes) throws IOException
write
in class OutputStream
IOException
public final void write(byte[] pBytes, int pOffset, int pLength) throws IOException
write
in class OutputStream
IOException
public final void write(int pByte)
write
in class OutputStream
public static void main(String[] pArgs) throws IOException
IOException
Copyright © 2018. All rights reserved.