IOBasics
IOBasics
I/O Basics
The io package of Java supports Javas basic I/O system, including file I/O (java.io ) We have not seen much I/O till now, because most real applications of Java are not text-based, console programs Rather, they are graphically oriented applets that rely upon Javas Abstract Window Toolkit (AWT) for interaction with the user
Streams
Java programs perform I/O through streams A stream is an abstraction that either produces or consumes information
A stream is linked to a physical device by the Java I/O system. All streams behave the same manner, even if the actual physical devices differs (disk file, keyboard, network socket)
Types of streams
They have also some concrete subclasses that overrides key methods, such as read( ) and write( )
Example
Reading Strings
End