public class LFWriter
extends java.io.FilterWriter
Constructor and Description |
---|
LFWriter(java.io.Writer out)
Create a new line-numbering writer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLineSeparator()
Gets the line separator of the println() methods.
|
void |
setLineSeparator(java.lang.String lineSeparator)
Sets the line separator for the println() methods.
|
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters.
|
void |
write(int c)
Write a single character.
|
void |
write(java.lang.String str,
int off,
int len)
Write a portion of a string.
|
public java.lang.String getLineSeparator()
public void setLineSeparator(java.lang.String lineSeparator)
public void write(int c) throws java.io.IOException
write
in class java.io.FilterWriter
java.io.IOException
- If an I/O error occurspublic void write(char[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.FilterWriter
cbuf
- Buffer of characters to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be writtenjava.io.IOException
- If an I/O error occurspublic void write(java.lang.String str, int off, int len) throws java.io.IOException
write
in class java.io.FilterWriter
str
- String to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be writtenjava.io.IOException
- If an I/O error occurs