Institute: Uie Department: Cse: Bachelor of Engineering (Computer Science & Engineering)
Institute: Uie Department: Cse: Bachelor of Engineering (Computer Science & Engineering)
DEPARTMENT : CSE
Bachelor of Engineering (Computer Science &
Engineering)
2
FilterWriter
Java FilterWriter class is an abstract class which is used to
write filtered character streams.
The sub class of the FilterWriter should override some of its
methods and it may provide additional methods and fields also.
Constructors
Modifier: protected
Constructor: FilterWriter(Writer out)
Description: It creates InputStream class Object
Class constructors
//illustrating markSupported()
if(fr.markSupported()) {
//illustrating mark() method
System.out.println("mark method is
supported");
fr.mark(100);
}
Example
//illustrating skip() method
fr.skip(5);
//illustrating ready()
if(fr.ready()) {
//illustrating read(char[] cbuff,int
off,int len)
fr.read(ch);
for (int i = 0; i < 8; i++) {
System.out.print(ch[i]);
}
//illustrating reset()
fr.reset();
for (int i = 0; i <5 ; i++) {
//illustrating read()
System.out.print((char)fr.read());
} }
//closing the stream
QUIZ:
a. FilterOutputStream
b. BufferedOutputStream
c. ByteArrayOutputStream
Summary: