new DataInputStream(new BufferedInputStream(new FileInputStream("temp.tmp")))

 
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    DataInputStream dis = new DataInputStream(new BufferedInputStream(new FileInputStream(
        "temp.tmp")));
    for (int i = 0; i < 10; i++)
      dis.readInt();
    dis.close();

  }
}
  
Home 
  Java Book 
    File Stream  

DataInputStream:
  1. DataInputStream
  2. new DataInputStream(FileInputStream fileInputStream)
  3. new DataInputStream(new BufferedInputStream(new FileInputStream("temp.tmp")))
  4. DataInputStream: readUnsignedShort()
  5. DataInputStream: readUTF()