Java DataInputStream Create getInputStream(String file)

Here you can find the source of getInputStream(String file)

Description

Return a buffered data input stream for file.

License

Open Source License

Declaration

public static DataInputStream getInputStream(String file) throws IOException 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    /**/*from   w  w  w  .  ja  va2 s  .c o m*/
     * Return a buffered data input stream for file.
     */
    public static DataInputStream getInputStream(String file) throws IOException {
        return getInputStream(new File(file));
    }

    /**
     * Return a buffered data input stream for f.
     */
    public static DataInputStream getInputStream(File f) throws IOException {
        return new DataInputStream(new BufferedInputStream(new FileInputStream(f), 32676));
    }
}

Related

  1. getInputStream(String path)
  2. getReaderFor(File file)