POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
for(int i=0; i<files.length; i++) {
// Open the file up
POIFSFileSystem fs = new POIFSFileSystem(
_samples.openResourceAsStream(files[i])
);
// Write it into a temp output array
ByteArrayOutputStream baos = new ByteArrayOutputStream();
fs.writeFilesystem(baos);