C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » Java programs

Java examples/programs on DataInputStream

This section contains solved programs/example of DataInputStream with output and explanation.

  1. Java program to read Boolean value from the file.
    In this java program, we are going to read Boolean value from the file using hasNextBoolean() method of Scanner class.
  2. Java program to rename an existing file.
    In this Java program, we are going to learn how to rename an existing file? This task can we performed using renameTo() method, which is a method of File class.
  3. Java program to write Bytes using ByteStream.
    In this program, we are going to learn to write bytes using ByteStream? To write data “byte-by-byte” in the file, we will use writeBytes() method.
  4. Java program to read an array using ByteStream.
    In this java program, we are going to learn how to read an array using ByteStream? ByteStream reads and write byte by byte data from/in a file.



COMMENTS