·
java provides IO package to write program which
can handle file as well as directory of system file
·
File class is used for basic operations. For e.g.,
1.
creating directory or folder
2.
deleting directory or folder
3.
to check existence of directory or folder
4.
to get path of directory or folder
5.
to check permission of directory or folder
·
some other basic classes are also available in
IO package such as:
1.
File
writer File reader: It is used
to read and write single character internally
2.
Buffer
Reader and Buffer Writer: It is used to read and write Buffer of characters
3.
Object
Input Stream and Object OutputStraem: It is used to read and write java
object and instance
4.
Binary
Input Stream and Binary Output Stream: It is used to read and write binary
characters and executable files
5.
File
Input Stream and File Output Stream: It is used for general purpose and
is basically used in selenium
FILE WRITER CLASS
·
This class is used to write characters into a
file after writing all the characters stream should be flushed using flush()
method. After performing all the write operations the stream should be closed
using close() method
NOTE: Generally
flush() and close() will be written inside finally block
·
The File Reader class is used to read characters
from the file. These characters are read by using read()
·
Read() will read the characters and stores as
array of characters
·
Take input from keyboard (resume)
No comments:
Post a Comment