Here you can find the source of getInputStream(String path)
Parameter | Description |
---|---|
path | File path where input stream is to be opened. |
Parameter | Description |
---|---|
FileNotFoundException | an exception |
public static DataInputStream getInputStream(String path) throws FileNotFoundException
//package com.java2s; //License from project: Apache License import java.io.*; public class Main { /**//from ww w . j a v a 2 s . c om * Opens an input stream for the specified path. * * @param path File path where input stream is to be opened. * @return The input stream. * @throws FileNotFoundException */ public static DataInputStream getInputStream(String path) throws FileNotFoundException { return new DataInputStream(new FileInputStream(path)); } }