Here you can find the source of getInputStream(String parentFolder, String fileName)
public static InputStream getInputStream(String parentFolder, String fileName) throws FileNotFoundException
//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; } }