package com.jeeplus.modules.esignature.utils;

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

public 
class FileHolder {
	private String filename;
	
	private File file;
	
	private InputStream is ;
	
	public FileHolder(File file) {
		this.filename = file.getName();
		this.file = file;
	}
	
	public FileHolder(String filename , InputStream is) {
		this.filename = filename;
		this.is = is;
	}
	
	public InputStream getInputStream() throws FileNotFoundException{
		if(is == null){
			return new FileInputStream(file);
		}
		return is;
	}

	public String getFilename() {
		return filename;
	}
	
	
}

