CITY COMPUTERS KARAD
C, C++, Data Structures, VB6, S2K VC++, COM/DCOM, ATL, JAVA, C#, VB.NET, ASP.NET, Web
Services, Linux, Oracle 10g, Developer 2000, PHP, MySQL, Mobile Prog., Web Development
(Contact for More Details: Shaikh Sir Mobile: 9960495146 )
JAVA Programming Course 1
We are offering guidance & training for most of certification courses based on Java Technologies (Sun
Microsystems), .Net Technologies (Microsoft), Databases [Oracle], PHP Technologies, Linux OS.
11. Zipping & Unzipping Streams
Zip provides both compression and archival format.
Zip format is created by Phil Katz for their software known as PKZip.
Zip compresses every file separately.
Archival format contains information about the names, permissions, creation and
modification dates and other information about each file where as Compression format
contains compressed data of each file
What actually we except from the I/O System:
I should be able to communicate with different sources & destinations.
I should be capable to deal [ read & write ] with different entities [ types of data ].
I should be able to communicate in a multiple ways.
I should be capable for dealing with underlying File System.
Java Program performs I/O through Streams.
Java views each file as a sequence of bytes.
Stream means sequence of bytes that travel from source to destination over a
communication path.
A Program can read from stream and write to stream.
Streams are linked to physical devices by IO System.
Streams are implemented by classes defined in java.io package.
Classes provide you same interfaces for different devices. But implementations are
different for each one.
Flow of bytes to output device called as Output Stream.
Flow of bytes from Input device called as Input Stream.
Here input source may be keyboard, files, Internet Connection, scanner or program.
And destination may be monitor, files, Internet Connection or program.
When you run your program, JVM [OS] connects the program with standard stream/
predefined stream for I/O.
Standard or predefined Streams
1. Input Stream ( System.in ) It represents keyboard.
2. Output Stream ( System.out / System.err ) It represents Monitor screen/ Console.
Both operate on character data.
System.in is an object of type InputStream; System.out & System.err are objects of type
PrintStream.
Note : Java does not provide any stream for printer unlike C. In Java, Printer is considered
as a graphical device.