|
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.FilterWriter
public abstract class FilterWriter
FilterWriter is a class which takes a Writer and filters the output in some way. The filtered view may be a buffered output or one which compresses data before actually writing the bytes.
FilterWriter| Field Summary | |
|---|---|
protected Writer |
out
The Writer being filtered. |
| Fields inherited from class java.io.Writer |
|---|
lock, TOKEN_NULL |
| Constructor Summary | |
|---|---|
protected |
FilterWriter(Writer out)
Constructs a new FilterWriter on the Writer out. |
| Method Summary | |
|---|---|
void |
close()
Close this FilterWriter. |
void |
flush()
Flush this FilteredWriter to ensure all pending data is sent out to the target Writer. |
void |
write(char[] buffer,
int offset,
int count)
Writes count chars from the char array
buffer starting at offset index to this
FilterWriter. |
void |
write(int oneChar)
Writes the specified char oneChar to this FilterWriter. |
void |
write(String str,
int offset,
int count)
Writes count chars from the String
str starting at offset index to this
FilterWriter. |
| 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 |
| Field Detail |
|---|
protected Writer out
| Constructor Detail |
|---|
protected FilterWriter(Writer out)
out. All
writes are now filtered through this Writer.
out - the target Writer to filter writes on.| Method Detail |
|---|
public void close()
throws IOException
out by default.
This will close any downstream Writers as well. Any additional processing
required by concrete subclasses should be provided in their own
close implementation.
close in interface Closeableclose in class WriterIOException - If an error occurs attempting to close this FilterWriter.
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException - If an error occurs attempting to flush this FilterWriter.
public void write(char[] buffer,
int offset,
int count)
throws IOException
count chars from the char array
buffer starting at offset index to this
FilterWriter. This implementation writes the buffer to the
target Writer.
write in class Writerbuffer - the buffer to be writtenoffset - offset in buffer to get charscount - number of chars in buffer to write
IOException - If an error occurs attempting to write to this FilterWriter.
public void write(int oneChar)
throws IOException
oneChar to this FilterWriter.
Only the 2 low order bytes of oneChar is written. This
implementation writes the char to the target Writer.
write in class WriteroneChar - the char to be written
IOException - If an error occurs attempting to write to this FilterWriter.
public void write(String str,
int offset,
int count)
throws IOException
count chars from the String
str starting at offset index to this
FilterWriter. This implementation writes the str to the
target Writer.
write in class Writerstr - the String to be written.offset - offset in str to get chars.count - number of chars in str to write.
IOException - If an error occurs attempting to write to this FilterWriter.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||