@NotThreadSafe public final class BufferedWriter extends Writer
The line separator instance field in java.io.BufferedWriter is assigned using AccessController and takes considerable amount of time especially if lots of BufferedWriters are created in the system.
This implementation should only be used if newLine method is not required such as netconf message to XML encoders. Methods in this implementation are not synchronized.
| Constructor and Description |
|---|
BufferedWriter(Writer writer) |
BufferedWriter(Writer writer,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(char[] buffer,
int offset,
int length) |
void |
write(int character) |
void |
write(String string,
int offset,
int length) |
public BufferedWriter(Writer writer)
public BufferedWriter(Writer writer, int bufferSize)
public void write(int character)
throws IOException
write in class WriterIOExceptionpublic void write(char[] buffer,
int offset,
int length)
throws IOException
write in class WriterIOExceptionpublic void write(String string, int offset, int length) throws IOException
write in class WriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class WriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterIOExceptionCopyright © 2017 OpenDaylight. All rights reserved.