public class LineBreakBufferedWriter extends PrintWriter
out
Constructor and Description |
---|
LineBreakBufferedWriter(Writer out,
int bufferSize)
Create a new linebreak-aware buffered writer with the given output and buffer
size.
|
LineBreakBufferedWriter(Writer out,
int bufferSize,
int initialCapacity)
Create a new linebreak-aware buffered writer with the given output, buffer
size and initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
flush()
Flush the current buffer.
|
void |
println()
Terminates the current line by writing the line separator string.
|
void |
write(char[] buf,
int off,
int len)
Writes A Portion of an array of characters.
|
void |
write(int c)
Writes a single character.
|
void |
write(String s,
int off,
int len)
Writes a portion of a string.
|
append, append, append, checkError, clearError, close, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write
public LineBreakBufferedWriter(Writer out, int bufferSize)
out
- The writer to write to.bufferSize
- The maximum buffer size.public LineBreakBufferedWriter(Writer out, int bufferSize, int initialCapacity)
out
- The writer to write to.bufferSize
- The maximum buffer size.initialCapacity
- The initial capacity of the internal buffer.public void flush()
flush
in interface Flushable
flush
in class PrintWriter
PrintWriter.checkError()
public void write(int c)
PrintWriter
write
in class PrintWriter
c
- int specifying a character to be written.public void println()
PrintWriter
line.separator
, and is not necessarily a single newline
character ('\n'
).println
in class PrintWriter
public void write(char[] buf, int off, int len)
PrintWriter
write
in class PrintWriter
buf
- Array of charactersoff
- Offset from which to start writing characterslen
- Number of characters to writepublic void write(String s, int off, int len)
PrintWriter
write
in class PrintWriter
s
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to write