FileDocCategorySizeDatePackage
FilterWriter.javaAPI DocJava SE 5 API2371Fri Aug 26 14:57:00 BST 2005java.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.16, 03/12/19
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()
Close the stream.

exception
IOException If an I/O error occurs

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

exception
IOException If an I/O error occurs

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

exception
IOException If an I/O error occurs

	out.write(c);
    
public voidwrite(char[] cbuf, int off, int len)
Write 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)
Write 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);