Home | Blog | Java | Jokes | Poems | Musings | Site Map | Kudos | Downloads | Useful Sites | Interesting | System Setup | Contact

Home Page

AKGBackup - The backup program

            

 

Section 11 : The java.io Package

 


 

Select valid constructor arguments for FilterInputStream and FilterOutputStream subclasses from a list of classes in the java.io.package.

 


 

FilterInputStream 

 

This class contains some other input stream, which it uses as a basic source of data. It simply overrides all methods of InputStream.

 

Valid constructors of some of the subclasses of this class:

 

  • BufferedInputStream (InputStream in)

  • BufferedInputStream (InputStream in, int size)

  • DataInputStream ((InputStream in)

  • PushbackInputStream (InputStream in)

  • PushbackInputStream (InputStream in, int size)

 

 

 

FilterOutputStream

 

This class contains some other output stream, which it uses as a basic source of data. It simply overrides all methods of OutputStream.

 

Valid constructors of some of the subclasses of this class:

 

  • BufferedOutputStream (OutputStream out)

  • BufferedOutputStream (OutputStream out, int size)

  • DataOutputStream (OutputStream out)

  • PrintStream (OutputStream out)

  • PrintStream (OutputStream out, boolean autoflush)

 

PrintStream never throws IOException. It provides print (), println () for all types.

 

The main point to keep in mind here is that you must be able to recognize the subclasses of InputStream and OutputStream. So, you must know the hierarchy of these classes.

 

InputStream

 

  • ByteArrayInputStream

  • FileInputStream

  • PipedInputStream

  • FilterInputStream

    • BufferedInputStream

    • PushbackInputStream

    • DataInputStream

  • ObjectInputStream

 

OutputStream

 

  • ByteArrayOutputStream

  • FileOutputStream

  • PipedOutputStream

  • FilterOutputStream

    • BufferedOutputStream

    • PrintStream

    • DataOutputStream

  • ObjectOutputStream

 

 


 

section11-1 | section11-2 | section11-3 | section11-4 | section11-5 | section11-6

 

Sections : 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11

 

 

 

 

 

 

 

Home | Blog | Java | Jokes | Poems | Musings | Site Map | Kudos | Downloads | Useful Sites | Interesting | System Setup | Contact  

Loading

 Number of Pages viewed on this site since January' 2003 : Hit Counter eXTReMe Tracker

For any queries, comments or suggestions, write to me .

This site never compromises your privacy, please read this site's privacy policy.