FileDocCategorySizeDatePackage
FilterWriter.javaAPI DocJava SE 6 API2273Tue Jun 10 00:25:32 BST 2008java.io

FilterWriter

public abstract class FilterWriter extends Writer
Abstract class for writing filtered character streams. The abstract class FilterWriter itself provides default methods that pass all requests to the contained stream. Subclasses of FilterWriter should override some of these methods and may also provide additional methods and fields.
version
1.18, 05/11/17
author
Mark Reinhold
since
JDK1.1

Fields Summary
protected Writer
out
The underlying character-output stream.
Constructors Summary
protected FilterWriter(Writer out)
Create a new filtered writer.

param
out a Writer object to provide the underlying stream.
throws
NullPointerException if out is null

	super(out);
	this.out = out;
    
Methods Summary
public voidclose()

	out.close();
    
public voidflush()
Flushes the stream.

exception
IOException If an I/O error occurs

	out.flush();
    
public voidwrite(int c)
Writes a single character.

exception
IOException If an I/O error occurs

	out.write(c);
    
public voidwrite(char[] cbuf, int off, int len)
Writes a portion of an array of characters.

param
cbuf Buffer of characters to be written
param
off Offset from which to start reading characters
param
len Number of characters to be written
exception
IOException If an I/O error occurs

	out.write(cbuf, off, len);
    
public voidwrite(java.lang.String str, int off, int len)
Writes a portion of a string.

param
str String to be written
param
off Offset from which to start reading characters
param
len Number of characters to be written
exception
IOException If an I/O error occurs

	out.write(str, off, len);