Saturday, December 17, 2011

I/O Stream Classes

  1. Byte Stream
  2. Character Stream
Byte Streams Classes:
  • InputStream (Abstract class)
  • OutputStream (Abstract class)
  • FileInputStream (Reads text from existing file)
  • FileOutputStream (Create a file and write text to it)
  • ByteArrayInputStream
  • ByteArrayOutputStream
  • FilteredInputStream
  • FilterOutputStream
  • BufferedInputStream
  • BufferedOutputStream
  • SequenceInputStream (allows to concatenate multiple InputStream)
  • PrintStream (Used for formatting like "printf" in c)
  • DataInputStream  (Read a sequence of bytes and convert them into values of a primitive type)
  • DataOutputStream (Convert values of primitive type into a byte sequence and then write it to the                 underlying stream)
  • RandomAccessFile 
Character Streams Classes: (unicode characters)
  • Reader (Abstract classes)
  • Writer (Abstract classes)
  • FileReader (Reads text from existing file)
  • FileWriter  (Create a file and write text to it)
  • CharArrayReader
  • CharArrayWriter
  • BufferedReader
  • BufferedWriter
  • PushbackReader
  • PrintWriter (If the argument is not a primitive type, the PrintWriter methods (print, println ,format) will call the object's toString( ) method)