Java Tutorial

 
 
 
 
import java.io.*;

class  ReadingBytes
{
    public static void main(String[] args) 
    {
           //Creating infile stream to read file
           FileInputStream infile=null;

           try{
               infile = new FileInputStream(args[0]);

               //Read and display data
               int b;
               while((b=infile.read())!=1){
                     System.out.print((char)b);
                }
                infile.close();
            }catch(Exception e) {}
    }
}

    Related Post:
  1. An applet program of showing new document using showDocument(URL) method

  2. RMI based application for login validation based on data saved in text file stored on the server and will display appropriate message to the client..

  3. Program to show the use of Conditional (Ternary) Operator

  4. Program to show the use of some Math Methods

  5. Program to Concat Strings

  6. Program to determine the sum of the following harmonic series for a given value of n

  7. Program of storing and retrieving integers using data streams on a single file

  8. Program to display reverse $ tree

  9. Word list program that reads a text file and makes an alphabetical list of all the words in that file. The list of words is output to another file

  10. Game application in CORBA for which player will guess a number between 1 to 100, which will be compared to the random number generated by the class

  11. Program for calculating area of a circle on server side,when a client sends request along with given radius and then displaying result on client side

  12. Program to convert the given temperature in faherenhiet to celsius using the following conversion formula C= F- 32/1.8

  13. Program of writing Bytes to a File

  14. An applet program that creates string dynamically and displays it

  15. Program which calls the method sort(int []a) which throws the Exception ArithmeticException, NullPointerException, ArrayIndexOutOfBoundsException

  16. An applet program that displays random dot

  17. Program to display following things on the client machine a)date and time of the server machine b)date and time of the client machine and difference

  18. Program to generate SQUARE ROOT table

  19. An applet program to draw circle in center of the canvas

  20. Program to display attributes of a specified file

 
 
Didn't find what you were looking for? Find more on Program to read bytes from a file