Java InputStream Create inputStream(String fileName)

Here you can find the source of inputStream(String fileName)

Description

input Stream

License

Open Source License

Declaration

public static FileInputStream inputStream(String fileName) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class Main {
    public static FileInputStream inputStream(String fileName) {
        FileInputStream stream = null;
        try {/*from   w ww.  jav a  2  s.c o m*/
            stream = new FileInputStream(new File(fileName));
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return stream;
    }
}

Related

  1. getInputStream(String xmlStr)
  2. getInputStream(String... subpaths)
  3. getInputStream(String[] args)
  4. inputStream(final File file)
  5. inputStream(final String in)
  6. inputStream(String path)
  7. inputStreamFromPath(String path)
  8. InputStreamFromString(String str)
  9. newInputStream(Class clazz, String filename)