poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1553465 - /poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
Date Thu, 26 Dec 2013 09:32:08 GMT
Author: centic
Date: Thu Dec 26 09:32:08 2013
New Revision: 1553465

URL: http://svn.apache.org/r1553465
Log:
Fix some Eclipse warnings in ReaderWriter

Modified:
    poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java?rev=1553465&r1=1553464&r2=1553465&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/ReaderWriter.java Thu Dec 26 09:32:08
2013
@@ -19,9 +19,12 @@
 
 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;
@@ -41,7 +44,7 @@ public class ReaderWriter
     private DirectoryEntry  root;
 
     // keys are DocumentDescriptors, values are byte[]s
-    private Map             dataMap;
+    private Map<DocumentDescriptor, byte[]>             dataMap;
 
     /**
      * Constructor ReaderWriter
@@ -55,7 +58,7 @@ public class ReaderWriter
     {
         this.filesystem = filesystem;
         root            = this.filesystem.getRoot();
-        dataMap         = new HashMap();
+        dataMap         = new HashMap<DocumentDescriptor, byte[]>();
     }
 
     /**
@@ -120,7 +123,7 @@ public class ReaderWriter
             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++)
@@ -173,7 +176,7 @@ public class ReaderWriter
 
             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)
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message