|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
java.io.BufferedWriter
public class BufferedWriter
BufferedWriter is for writing buffered character output. Characters written to this Writer are buffered internally before being committed to the target Writer.
BufferedReader| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock, TOKEN_NULL |
| Constructor Summary | |
|---|---|
BufferedWriter(Writer out)
Constructs a new BufferedReader with out as the Writer on
which to buffer write operations. |
|
BufferedWriter(Writer out,
int size)
Constructs a new BufferedReader with out as the Writer on
which buffer write operations. |
|
| Method Summary | |
|---|---|
void |
close()
Close this BufferedWriter. |
void |
flush()
Flush this BufferedWriter. |
void |
newLine()
Write a newline to thie Writer. |
void |
write(char[] cbuf,
int offset,
int count)
Writes out count characters starting at
offset in buf to this BufferedWriter. |
void |
write(int oneChar)
Writes the character oneChar BufferedWriter. |
void |
write(String str,
int offset,
int count)
Writes out count characters starting at
offset in str to this BufferedWriter. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BufferedWriter(Writer out)
out as the Writer on
which to buffer write operations. The buffer size is set to the default,
which is 8K.
out - The Writer to buffer character writing on
public BufferedWriter(Writer out,
int size)
out as the Writer on
which buffer write operations. The buffer size is set to
size.
out - The Writer to buffer character writing on.size - The size of the buffer to use.| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class WriterIOException - If an error occurs attempting to close this Writer.
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException - If an error occurs attempting to flush this Writer.
public void newLine()
throws IOException
IOException - If an error occurs attempting to write to this Writer.
public void write(char[] cbuf,
int offset,
int count)
throws IOException
count characters starting at
offset in buf to this BufferedWriter. If
count is greater than this Writers buffer then flush the
contents and also write the characters directly to the target Writer.
write in class Writercbuf - the non-null array containing characters to write.offset - offset in buf to retrieve characterscount - maximum number of characters to write
IOException - If this Writer has already been closed or some other
IOException occurs.
IndexOutOfBoundsException - If offset or count are outside of bounds.
public void write(int oneChar)
throws IOException
oneChar BufferedWriter. If the buffer
is filled by writing this character, flush this Writer. Only the lower 2
bytes are written.
write in class WriteroneChar - The Character to write out.
IOException - If this Writer has already been closed or some other
IOException occurs.
public void write(String str,
int offset,
int count)
throws IOException
count characters starting at
offset in str to this BufferedWriter. If
count is greater than this Writers buffer then flush the
contents and also write the characters directly to the target Writer.
write in class Writerstr - the non-null String containing characters to writeoffset - offset in str to retrieve characterscount - maximum number of characters to write
IOException - If this Writer has already been closed or some other
IOException occurs.
ArrayIndexOutOfBoundsException - If offset or count are outside of bounds.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||