Closeable, Flushable, AutoCloseablepublic 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 AutoCloseableclose in interface Closeableclose in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic final void write(byte[] pBytes)
throws IOException
write in class OutputStreamIOExceptionpublic final void write(byte[] pBytes,
int pOffset,
int pLength)
throws IOException
write in class OutputStreamIOExceptionpublic final void write(int pByte)
write in class OutputStreampublic static void main(String[] pArgs) throws IOException
IOExceptionCopyright © 2018. All rights reserved.