package org.apache.poi.poifs.filesystem;
-import java.util.*;
-
-import java.io.*;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.poi.poifs.eventfilesystem.POIFSReader;
import org.apache.poi.poifs.eventfilesystem.POIFSReaderEvent;
private DirectoryEntry root;
// keys are DocumentDescriptors, values are byte[]s
- private Map dataMap;
+ private Map<DocumentDescriptor, byte[]> dataMap;
/**
* Constructor ReaderWriter
{
this.filesystem = filesystem;
root = this.filesystem.getRoot();
- dataMap = new HashMap();
+ dataMap = new HashMap<DocumentDescriptor, byte[]>();
}
/**
System.out.println("adding document: " + descriptor + " (" + size
+ " bytes)");
dataMap.put(descriptor, data);
- int pathLength = path.length();
+ //int pathLength = path.length();
DirectoryEntry entry = root;
for (int k = 0; k < path.length(); k++)
System.out.println("looking up document: " + descriptor + " ("
+ event.getLimit() + " bytes)");
- event.getStream().write(( byte [] ) dataMap.get(descriptor));
+ event.getStream().write(dataMap.get(descriptor));
}
catch (IOException e)
{