Java I/0 Examples
Data streams are filtered streams that perform binary I/O operation on primitive data type values ( boolean, char, byte, short, int, long, etc.) as well as on String values. If you need to work with data that is not represented as bytes or characters then you can use Data Streams.
n this section, you will learn about the Random Access File class provided by java. io package. This is a class that allows you to read and write arbitrary bytes, text, and primitive Java data types from or to any specified location in a file.
In this section, you will learn, how a Filename path is converted to a URL and vice versa . URL stands for Uniform Resource Locator.
In Java, The StreamTokenizer class is used for simple parsing of a Java source file into tokens. This class takes an input stream, breaks up the ASCII text in a file and parses it into "tokens". It allows the tokens to be read one at a time.
Java programs use Unicode text internally. It supports standard UTF-8 when reading and writing strings through the InputStreamReader and the OutputStreamWriter.
Serialization is the process of saving an object in a storage medium (such as a file, or a memory buffer) or to transmit it over a network connection in binary form.
The opposite operation of the serialization is called deserialization i.e. to extracting the data from a series of bytes is s known as deserialization
In this example we are discussing the deletion of a file or a directory by using a java program. We pass the file name or the directory name to which we want to delete.
This section illustrates you the procedure of viewing complete html code of a page i.e. running on the server.
This Program file download from URL and save this Url File in the specified directory. This program specifies the directory path where the files to be stored as first command line argument and second command line arguments specifies URL File to be stored.
In this section, we have developed an application to create xml file from flat file and data insert into database in Java.
In this section, you will learn how to delete a file.
In this section you will learn how to read line by line data from a file using BufferedReader.
Java has Two types of streams- Byte & Characters.
As we discussed earlier, java has two kinds of streams- Byte & Characters.
This section contains the detail about how to get the last modification date of a file.
For file handling in java, the package known as java.io is available.
In this section, we will discuss how to compare pathname of two file for the equality of their path.
In this section, you will learn how to write to a file using BufferedWriter.
In this section, you will learn how to copy content of one file into another file.