ByteArrayWriterpublic final class BufferedWriterDecorator extends java.lang.Object implements ByteArrayWriter
ByteArrayWriter implementation. Data will be finally written if
either the buffer is full or flush() or close() is called.| Constructor | Description |
|---|---|
BufferedWriterDecorator(ByteArrayWriter writer) |
| Modifier and Type | Method | 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 BufferedWriterDecorator(ByteArrayWriter writer)
writer - Underlying writerpublic void write(byte[] data,
int length)
throws java.io.IOException
ByteArrayWriterwrite in interface ByteArrayWriterdata - Byte array to outputlength - Number of bytes to outputjava.io.IOException - Writing failedpublic void flush()
throws java.io.IOException
ByteArrayWriterflush in interface ByteArrayWriterjava.io.IOException - Writing failedpublic void close()
throws java.io.IOException
ByteArrayWriterclose in interface ByteArrayWriterjava.io.IOException - Closing failedCopyright © 2019. All rights reserved.