I have a query that is in the below code i have a file name as shown below
String filename = "C:\\abcd\\Ttre.xls";
which later on i am passing to FileInputStream object as shown below
FileInputStream fileStream = new FileInputStream(filename);
workbook = new HSSFWorkbook(fileStream);
the happy case above was that filename was hardcoded which was pass to the FileInputStream object but lets say if some one is giving me file in form of byte array then how to deal with that case for example
as shown below
public void abcd( byte[] excelByteStream) {
//how to pass the the byte array file to the FileInputStream object
}
so in that case how we would pass the bytestream file to the FileInputStream object please advise
InputStreamin its constructor or does it specifically need aFileInputStream?