Java InputStream Create getInputStream(String parentFolder, String fileName)

Here you can find the source of getInputStream(String parentFolder, String fileName)

Description

get Input Stream

License

Open Source License

Declaration

public static InputStream getInputStream(String parentFolder, String fileName) throws FileNotFoundException 

Method Source Code

//package com.java2s;
/******************************************************************************* 
 * Copyright (c) 2008 Red Hat, Inc. //from  w  w  w . j av a  2  s.com
 * Distributed under license by Red Hat, Inc. All rights reserved. 
 * This program is made available under the terms of the 
 * Eclipse Public License v1.0 which accompanies this distribution, 
 * and is available at http://www.eclipse.org/legal/epl-v10.html 
 * 
 * Contributors: 
 * Red Hat, Inc. - initial API and implementation 
 ******************************************************************************/

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

import java.io.InputStream;

public class Main {
    public static InputStream getInputStream(String parentFolder, String fileName) throws FileNotFoundException {
        File file = new File(parentFolder, fileName);
        InputStream input = new FileInputStream(file);
        return input;

    }
}

Related

  1. getInputStream(String filePath)
  2. getInputStream(String fileType, String fileName)
  3. getInputStream(String fname, String enc)
  4. getInputStream(String inputFile)
  5. getInputStream(String location)
  6. getInputStream(String path)
  7. getInputStream(String path)
  8. getInputStream(String path)
  9. getInputStream(String sPath)