Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

File and Streams in Java : Complete Tutorial

Share this post!
 Vote this!

Persistent data is stored in files, which are stored on hard disks, flash drives, etc. This website discusses the following ways to access a file:
  • Sequentially
  • Randomly
A file itself is just a bunch of related records, companies payroll, stocks, etc. Files themselves can grow to a very large size normally determined by the operating system. There are many ways of organizing records in a file, the common type is called sequential file in which records are typically stored in order by the record-key field. In some instanaces records could be stored in a database but even a database stores its data in files.
File and Streams
Java views each file as a sequential stream of bytes, each file ends with either an end-of-file marker or at a specific byte number record. Three streams are automatically created when we begin executing a Java program
  • System.in  - standard input stream object (normally the keyboard or mouse)
  • System.out - standard output stream object (normally the display)
  • System.err - standard error stream object (normally the display)
The java.io package contains many classes and interfaces that relate to Java I/O a portion of it is below  more...

0 comments:

Post a Comment