public final class BufferingWriter extends Writer
The standard java.io classes have hidden synchronization so in some very critical situations, this can be expensive.
This class is not thread safe.Constructor and Description |
---|
BufferingWriter(Writer dest)
Create a buffering writer
|
BufferingWriter(Writer dest,
int size)
Create a buffering writer
|
BufferingWriter(Writer dest,
int size,
int blobSize)
Create a buffering writer
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
output(char ch)
Output a single character
|
void |
output(char[] chars)
Output an array of characters
|
void |
output(char[] chars,
int start,
int length)
Output an array of characters
|
void |
output(String string)
Output a string
|
void |
output(String string,
int off,
int length)
Output a string
|
void |
write(char[] cbuf) |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int ch) |
void |
write(String string) |
void |
write(String string,
int off,
int len) |
public BufferingWriter(Writer dest)
public BufferingWriter(Writer dest, int size)
public BufferingWriter(Writer dest, int size, int blobSize)
public void output(String string)
string
- Characterspublic void output(String string, int off, int length)
string
- Charactersoff
- Starting point in the stringlength
- Lengthpublic void output(char[] chars)
public void output(char[] chars, int start, int length)
chars
- Charactersstart
- Startlength
- Lengthpublic void output(char ch)
public void close()
public void flush()
public void write(char[] cbuf, int off, int len) throws IOException
write
in class Writer
IOException
public void write(char[] cbuf) throws IOException
write
in class Writer
IOException
public void write(String string, int off, int len) throws IOException
write
in class Writer
IOException
public void write(String string) throws IOException
write
in class Writer
IOException
public void write(int ch) throws IOException
write
in class Writer
IOException
Licenced under the Apache License, Version 2.0