public final class OutputStreamWriter extends Object implements ByteArrayWriter
OutputStream as writer.| Constructor and Description |
|---|
OutputStreamWriter(OutputStream stream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this writer and releases any associated system resources.
|
void |
flush()
Forces writing of any buffered data.
|
void |
write(byte[] data,
int length)
Outputs a byte array.
|
public OutputStreamWriter(OutputStream stream)
stream - Underlying output streampublic void write(byte[] data,
int length)
throws IOException
ByteArrayWriterwrite in interface ByteArrayWriterdata - Byte array to outputlength - Number of bytes to outputIOException - Writing failedpublic void flush()
ByteArrayWriterflush in interface ByteArrayWriterpublic void close()
throws IOException
ByteArrayWriterclose in interface ByteArrayWriterIOException - Closing failedCopyright © 2020. All rights reserved.