You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/05/11 20:15:04 UTC

svn commit: r1678787 - in /poi/trunk/src: java/org/apache/poi/poifs/eventfilesystem/ java/org/apache/poi/poifs/filesystem/ java/org/apache/poi/poifs/property/ java/org/apache/poi/poifs/storage/ testcases/org/apache/poi/hssf/usermodel/ testcases/org/apa...

Author: nick
Date: Mon May 11 18:15:03 2015
New Revision: 1678787

URL: http://svn.apache.org/r1678787
Log:
#56791 More updates from OPOIFS to NPOIFS

Added:
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java
      - copied, changed from r1678687, poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
Removed:
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
Modified:
    poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/ODocumentInputStream.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
    poi/trunk/src/java/org/apache/poi/poifs/property/DocumentProperty.java
    poi/trunk/src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
    poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocument.java
    poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
    poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentNode.java
    poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java

Modified: poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java Mon May 11 18:15:03 2015
@@ -24,7 +24,7 @@ import java.io.*;
 import java.util.*;
 
 import org.apache.poi.poifs.filesystem.DocumentInputStream;
-import org.apache.poi.poifs.filesystem.POIFSDocument;
+import org.apache.poi.poifs.filesystem.OPOIFSDocument;
 import org.apache.poi.poifs.filesystem.POIFSDocumentPath;
 import org.apache.poi.poifs.property.DirectoryProperty;
 import org.apache.poi.poifs.property.Property;
@@ -240,19 +240,19 @@ public class POIFSReader
 
                 if (listeners.hasNext())
                 {
-                    int           size     = property.getSize();
-                    POIFSDocument document = null;
+                    int            size     = property.getSize();
+                    OPOIFSDocument document = null;
 
                     if (property.shouldUseSmallBlocks())
                     {
                         document =
-                            new POIFSDocument(name, small_blocks
+                            new OPOIFSDocument(name, small_blocks
                                 .fetchBlocks(startBlock, -1), size);
                     }
                     else
                     {
                         document =
-                            new POIFSDocument(name, big_blocks
+                            new OPOIFSDocument(name, big_blocks
                                 .fetchBlocks(startBlock, -1), size);
                     }
                     while (listeners.hasNext())

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java Mon May 11 18:15:03 2015
@@ -217,7 +217,7 @@ public class DirectoryNode
      *
      * @exception IOException
      */
-    DocumentEntry createDocument(final POIFSDocument document)
+    DocumentEntry createDocument(final OPOIFSDocument document)
         throws IOException
     {
         DocumentProperty property = document.getDocumentProperty();
@@ -418,7 +418,7 @@ public class DirectoryNode
         if(_nfilesystem != null) {
            return createDocument(new NPOIFSDocument(name, _nfilesystem, stream));
         } else {
-           return createDocument(new POIFSDocument(name, stream));
+           return createDocument(new OPOIFSDocument(name, stream));
         }
     }
 
@@ -441,7 +441,7 @@ public class DirectoryNode
         if(_nfilesystem != null) {
             return createDocument(new NPOIFSDocument(name, size, _nfilesystem, writer));
          } else {
-            return createDocument(new POIFSDocument(name, size, _path, writer));
+            return createDocument(new OPOIFSDocument(name, size, _path, writer));
          }
     }
 

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java Mon May 11 18:15:03 2015
@@ -72,7 +72,7 @@ public class DocumentInputStream extends
 	 * 
 	 * @param document the Document to be read
 	 */
-	public DocumentInputStream(POIFSDocument document) {
+	public DocumentInputStream(OPOIFSDocument document) {
 	   delegate = new ODocumentInputStream(document);
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java Mon May 11 18:15:03 2015
@@ -27,18 +27,15 @@ import org.apache.poi.poifs.dev.POIFSVie
 import org.apache.poi.poifs.property.DocumentProperty;
 
 /**
- * Simple implementation of DocumentEntry
- *
- * @author Marc Johnson (mjohnson at apache dot org)
+ * Simple implementation of DocumentEntry for OPOIFS
  */
-
 public class DocumentNode
     extends EntryNode
     implements DocumentEntry, POIFSViewable
 {
 
     // underlying POIFSDocument instance
-    private POIFSDocument _document;
+    private OPOIFSDocument _document;
 
     /**
      * create a DocumentNode. This method is not public by design; it
@@ -59,8 +56,7 @@ public class DocumentNode
      *
      * @return the internal POIFSDocument
      */
-
-    POIFSDocument getDocument()
+    OPOIFSDocument getDocument()
     {
         return _document;
     }

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/ODocumentInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/ODocumentInputStream.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/ODocumentInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/ODocumentInputStream.java Mon May 11 18:15:03 2015
@@ -23,9 +23,7 @@ import org.apache.poi.poifs.storage.Data
 
 /**
  * This class provides methods to read a DocumentEntry managed by a
- * {@link POIFSFileSystem} instance.
- *
- * @author Marc Johnson (mjohnson at apache dot org)
+ * {@link OPOIFSFileSystem} instance.
  */
 public final class ODocumentInputStream extends DocumentInputStream {
 	/** current offset into the Document */
@@ -41,7 +39,7 @@ public final class ODocumentInputStream
 	private boolean _closed;
 
 	/** the actual Document */
-	private POIFSDocument _document;
+	private OPOIFSDocument _document;
 
 	/** the data block containing the current stream pointer */
 	private DataInputBlock _currentBlock;
@@ -59,7 +57,7 @@ public final class ODocumentInputStream
 			throw new IOException("Cannot open internal document storage");
 		}
 		DocumentNode documentNode = (DocumentNode)document;
-		if(documentNode.getDocument() == null) {
+		if (documentNode.getDocument() == null) {
          throw new IOException("Cannot open internal document storage");
 		}
 		      
@@ -76,7 +74,7 @@ public final class ODocumentInputStream
 	 * 
 	 * @param document the Document to be read
 	 */
-	public ODocumentInputStream(POIFSDocument document) {
+	public ODocumentInputStream(OPOIFSDocument document) {
 		_current_offset = 0;
 		_marked_offset = 0;
 		_document_size = document.getSize();

Copied: poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java (from r1678687, poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java)
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java?p2=poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java&p1=poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java&r1=1678687&r2=1678787&rev=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSDocument.java Mon May 11 18:15:03 2015
@@ -40,11 +40,10 @@ import org.apache.poi.poifs.storage.Smal
 import org.apache.poi.util.HexDump;
 
 /**
- * This class manages a document in the POIFS filesystem.
- *
- * @author Marc Johnson (mjohnson at apache dot org)
+ * This class manages a document in a old-style 
+ *  OPOIFS filesystem.
  */
-public final class POIFSDocument implements BATManaged, BlockWritable, POIFSViewable  {
+public final class OPOIFSDocument implements BATManaged, BlockWritable, POIFSViewable  {
 	private static final DocumentBlock[] EMPTY_BIG_BLOCK_ARRAY = { };
 	private static final SmallDocumentBlock[] EMPTY_SMALL_BLOCK_ARRAY = { };
 	private DocumentProperty _property;
@@ -63,7 +62,7 @@ public final class POIFSDocument impleme
 	 * @param blocks the big blocks making up the POIFSDocument
 	 * @param length the actual length of the POIFSDocument
 	 */
-	public POIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException {
+	public OPOIFSDocument(String name, RawDataBlock[] blocks, int length) throws IOException {
 		_size = length;
 		if(blocks.length == 0) {
 		   _bigBigBlockSize = POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS;
@@ -104,7 +103,7 @@ public final class POIFSDocument impleme
 	 * @param blocks the small blocks making up the POIFSDocument
 	 * @param length the actual length of the POIFSDocument
 	 */
-	public POIFSDocument(String name, SmallDocumentBlock[] blocks, int length) {
+	public OPOIFSDocument(String name, SmallDocumentBlock[] blocks, int length) {
 		_size = length;
 		
 		if(blocks.length == 0) {
@@ -126,7 +125,7 @@ public final class POIFSDocument impleme
 	 * @param blocks the small blocks making up the POIFSDocument
 	 * @param length the actual length of the POIFSDocument
 	 */
-	public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, ListManagedBlock[] blocks, int length) throws IOException {
+	public OPOIFSDocument(String name, POIFSBigBlockSize bigBlockSize, ListManagedBlock[] blocks, int length) throws IOException {
 		_size = length;
 		_bigBigBlockSize = bigBlockSize;
 		_property = new DocumentProperty(name, _size);
@@ -139,7 +138,7 @@ public final class POIFSDocument impleme
 			_small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY);
 		}
 	}
-	public POIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException {
+	public OPOIFSDocument(String name, ListManagedBlock[] blocks, int length) throws IOException {
 	   this(name, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, blocks, length);
 	}
 
@@ -149,7 +148,7 @@ public final class POIFSDocument impleme
 	 * @param name the name of the POIFSDocument
 	 * @param stream the InputStream we read data from
 	 */
-	public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException {
+	public OPOIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException {
 		List<DocumentBlock> blocks = new ArrayList<DocumentBlock>();
 
 		_size = 0;
@@ -178,7 +177,7 @@ public final class POIFSDocument impleme
 			_small_store = new SmallBlockStore(bigBlockSize,EMPTY_SMALL_BLOCK_ARRAY);
 		}
 	}
-	public POIFSDocument(String name, InputStream stream) throws IOException {
+	public OPOIFSDocument(String name, InputStream stream) throws IOException {
 	   this(name, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, stream);
 	}
 
@@ -190,7 +189,7 @@ public final class POIFSDocument impleme
 	 * @param path the path of the POIFSDocument
 	 * @param writer the writer who will eventually write the document contents
 	 */
-	public POIFSDocument(String name, int size, POIFSBigBlockSize bigBlockSize, POIFSDocumentPath path, POIFSWriterListener writer) {
+	public OPOIFSDocument(String name, int size, POIFSBigBlockSize bigBlockSize, POIFSDocumentPath path, POIFSWriterListener writer) {
 		_size = size;
 		_bigBigBlockSize = bigBlockSize;
 		_property = new DocumentProperty(name, _size);
@@ -203,7 +202,7 @@ public final class POIFSDocument impleme
 			_big_store = new BigBlockStore(_bigBigBlockSize, path, name, size, writer);
 		}
 	}
-	public POIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer) {
+	public OPOIFSDocument(String name, int size, POIFSDocumentPath path, POIFSWriterListener writer) {
 	   this(name, size, POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS, path, writer);
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/OPOIFSFileSystem.java Mon May 11 18:15:03 2015
@@ -445,7 +445,7 @@ public class OPOIFSFileSystem
      * @param document the POIFSDocument being added
      */
 
-    void addDocument(final POIFSDocument document)
+    void addDocument(final OPOIFSDocument document)
     {
         _documents.add(document);
         _property_table.addProperty(document.getDocumentProperty());
@@ -508,21 +508,21 @@ public class OPOIFSFileSystem
             {
                 int           startBlock = property.getStartBlock();
                 int           size       = property.getSize();
-                POIFSDocument document   = null;
+                OPOIFSDocument document  = null;
 
                 if (property.shouldUseSmallBlocks())
                 {
                     document =
-                        new POIFSDocument(name,
-                                          small_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
-                                          size);
+                        new OPOIFSDocument(name,
+                                           small_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
+                                           size);
                 }
                 else
                 {
                     document =
-                        new POIFSDocument(name,
-                                          big_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
-                                          size);
+                        new OPOIFSDocument(name,
+                                           big_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
+                                           size);
                 }
                 parent.createDocument(document);
             }

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java Mon May 11 18:15:03 2015
@@ -447,7 +447,7 @@ public class POIFSFileSystem
      * @param document the POIFSDocument being added
      */
 
-    void addDocument(final POIFSDocument document)
+    void addDocument(final OPOIFSDocument document)
     {
         _documents.add(document);
         _property_table.addProperty(document.getDocumentProperty());
@@ -510,21 +510,21 @@ public class POIFSFileSystem
             {
                 int           startBlock = property.getStartBlock();
                 int           size       = property.getSize();
-                POIFSDocument document   = null;
+                OPOIFSDocument document  = null;
 
                 if (property.shouldUseSmallBlocks())
                 {
                     document =
-                        new POIFSDocument(name,
-                                          small_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
-                                          size);
+                        new OPOIFSDocument(name,
+                                           small_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
+                                           size);
                 }
                 else
                 {
                     document =
-                        new POIFSDocument(name,
-                                          big_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
-                                          size);
+                        new OPOIFSDocument(name,
+                                           big_blocks.fetchBlocks(startBlock, headerPropertiesStartAt),
+                                           size);
                 }
                 parent.createDocument(document);
             }

Modified: poi/trunk/src/java/org/apache/poi/poifs/property/DocumentProperty.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/property/DocumentProperty.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/property/DocumentProperty.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/property/DocumentProperty.java Mon May 11 18:15:03 2015
@@ -19,12 +19,10 @@
 
 package org.apache.poi.poifs.property;
 
-import org.apache.poi.poifs.filesystem.POIFSDocument;
+import org.apache.poi.poifs.filesystem.OPOIFSDocument;
 
 /**
  * Trivial extension of Property for POIFSDocuments
- *
- * @author Marc Johnson (mjohnson at apache dot org)
  */
 
 public class DocumentProperty
@@ -32,7 +30,7 @@ public class DocumentProperty
 {
 
     // the POIFSDocument this property is associated with
-    private POIFSDocument _document;
+    private OPOIFSDocument _document;
 
     /**
      * Constructor
@@ -72,7 +70,7 @@ public class DocumentProperty
      * @param doc the associated POIFSDocument
      */
 
-    public void setDocument(POIFSDocument doc)
+    public void setDocument(OPOIFSDocument doc)
     {
         _document = doc;
     }
@@ -83,7 +81,7 @@ public class DocumentProperty
      * @return the associated document
      */
 
-    public POIFSDocument getDocument()
+    public OPOIFSDocument getDocument()
     {
         return _document;
     }

Modified: poi/trunk/src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/storage/SmallBlockTableWriter.java Mon May 11 18:15:03 2015
@@ -22,7 +22,7 @@ package org.apache.poi.poifs.storage;
 import org.apache.poi.poifs.common.POIFSBigBlockSize;
 import org.apache.poi.poifs.common.POIFSConstants;
 import org.apache.poi.poifs.filesystem.BATManaged;
-import org.apache.poi.poifs.filesystem.POIFSDocument;
+import org.apache.poi.poifs.filesystem.OPOIFSDocument;
 import org.apache.poi.poifs.property.RootProperty;
 
 import java.util.*;
@@ -62,7 +62,7 @@ public class SmallBlockTableWriter
 
         while (iter.hasNext())
         {
-            POIFSDocument   doc    = ( POIFSDocument ) iter.next();
+            OPOIFSDocument   doc    = ( OPOIFSDocument ) iter.next();
             BlockWritable[] blocks = doc.getSmallBlocks();
 
             if (blocks.length != 0)

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java Mon May 11 18:15:03 2015
@@ -32,7 +32,6 @@ import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Calendar;

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocument.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocument.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocument.java Mon May 11 18:15:03 2015
@@ -28,27 +28,25 @@ import org.apache.poi.poifs.storage.RawD
 import org.apache.poi.poifs.storage.SmallDocumentBlock;
 
 /**
- * Class to test POIFSDocument functionality
- *
- * @author Marc Johnson
+ * Class to test OPOIFSDocument functionality
  */
 public final class TestDocument extends TestCase {
 
     /**
      * Integration test -- really about all we can do
      */
-    public void testPOIFSDocument() throws IOException {
+    public void testOPOIFSDocument() throws IOException {
 
         // verify correct number of blocks get created for document
         // that is exact multituple of block size
-        POIFSDocument document;
+        OPOIFSDocument document;
         byte[]        array = new byte[ 4096 ];
 
         for (int j = 0; j < array.length; j++)
         {
             array[ j ] = ( byte ) j;
         }
-        document = new POIFSDocument("foo", new SlowInputStream(new ByteArrayInputStream(array)));
+        document = new OPOIFSDocument("foo", new SlowInputStream(new ByteArrayInputStream(array)));
         checkDocument(document, array);
 
         // verify correct number of blocks get created for document
@@ -58,7 +56,7 @@ public final class TestDocument extends
         {
             array[ j ] = ( byte ) j;
         }
-        document = new POIFSDocument("bar", new ByteArrayInputStream(array));
+        document = new OPOIFSDocument("bar", new ByteArrayInputStream(array));
         checkDocument(document, array);
 
         // verify correct number of blocks get created for document
@@ -68,7 +66,7 @@ public final class TestDocument extends
         {
             array[ j ] = ( byte ) j;
         }
-        document = new POIFSDocument("_bar", new ByteArrayInputStream(array));
+        document = new OPOIFSDocument("_bar", new ByteArrayInputStream(array));
         checkDocument(document, array);
 
         // verify correct number of blocks get created for document
@@ -78,7 +76,7 @@ public final class TestDocument extends
         {
             array[ j ] = ( byte ) j;
         }
-        document = new POIFSDocument("_bar2",
+        document = new OPOIFSDocument("_bar2",
                                      new ByteArrayInputStream(array));
         checkDocument(document, array);
 
@@ -88,7 +86,7 @@ public final class TestDocument extends
         {
             array[ j ] = ( byte ) j;
         }
-        document = new POIFSDocument("foobar",
+        document = new OPOIFSDocument("foobar",
                                      new ByteArrayInputStream(array));
         checkDocument(document, array);
         document.setStartBlock(0x12345678);   // what a big file!!
@@ -135,9 +133,9 @@ public final class TestDocument extends
         }
     }
 
-    private static POIFSDocument makeCopy(POIFSDocument document, byte[] input, byte[] data)
+    private static OPOIFSDocument makeCopy(OPOIFSDocument document, byte[] input, byte[] data)
             throws IOException {
-        POIFSDocument copy = null;
+        OPOIFSDocument copy = null;
 
         if (input.length >= 4096)
         {
@@ -156,12 +154,12 @@ public final class TestDocument extends
                 }
                 blocks[ index++ ] = block;
             }
-            copy = new POIFSDocument("test" + input.length, blocks,
+            copy = new OPOIFSDocument("test" + input.length, blocks,
                                      input.length);
         }
         else
         {
-            copy = new POIFSDocument(
+            copy = new OPOIFSDocument(
                 "test" + input.length,
                 ( SmallDocumentBlock [] ) document.getSmallBlocks(),
                 input.length);
@@ -169,7 +167,7 @@ public final class TestDocument extends
         return copy;
     }
 
-    private static void checkDocument(final POIFSDocument document, final byte[] input)
+    private static void checkDocument(final OPOIFSDocument document, final byte[] input)
             throws IOException {
         int big_blocks   = 0;
         int small_blocks = 0;
@@ -195,7 +193,7 @@ public final class TestDocument extends
     }
 
     private static byte[] checkValues(int big_blocks, int small_blocks, int total_output,
-            POIFSDocument document, byte[] input) throws IOException {
+            OPOIFSDocument document, byte[] input) throws IOException {
         assertEquals(document, document.getDocumentProperty().getDocument());
         int increment = ( int ) Math.sqrt(input.length);
 

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java Mon May 11 18:15:03 2015
@@ -64,8 +64,8 @@ public final class TestDocumentInputStre
         {
             rawBlocks[ j ] = new RawDataBlock(stream);
         }
-        POIFSDocument document = new POIFSDocument("Workbook", rawBlocks,
-                                                   _workbook_size);
+        OPOIFSDocument document = new OPOIFSDocument("Workbook", rawBlocks,
+                                                     _workbook_size);
 
         _workbook_o = new DocumentNode(
             document.getDocumentProperty(),

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentNode.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentNode.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentNode.java Mon May 11 18:15:03 2015
@@ -46,7 +46,7 @@ public final class TestDocumentNode exte
         {
             rawBlocks[ j ] = new RawDataBlock(stream);
         }
-        POIFSDocument    document  = new POIFSDocument("document", rawBlocks,
+        OPOIFSDocument   document  = new OPOIFSDocument("document", rawBlocks,
                                          2000);
         DocumentProperty property2 = document.getDocumentProperty();
         DirectoryNode    parent    = new DirectoryNode(property1, (POIFSFileSystem)null, null);

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java?rev=1678787&r1=1678786&r2=1678787&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/storage/TestSmallBlockTableWriter.java Mon May 11 18:15:03 2015
@@ -25,7 +25,7 @@ import java.util.List;
 import junit.framework.TestCase;
 
 import org.apache.poi.poifs.common.POIFSConstants;
-import org.apache.poi.poifs.filesystem.POIFSDocument;
+import org.apache.poi.poifs.filesystem.OPOIFSDocument;
 import org.apache.poi.poifs.property.PropertyTable;
 import org.apache.poi.poifs.property.RootProperty;
 
@@ -37,43 +37,43 @@ import org.apache.poi.poifs.property.Roo
 public final class TestSmallBlockTableWriter extends TestCase {
 
     public void testWritingConstructor() throws IOException {
-        List<POIFSDocument> documents = new ArrayList<POIFSDocument>();
+        List<OPOIFSDocument> documents = new ArrayList<OPOIFSDocument>();
 
         documents.add(
-            new POIFSDocument(
+            new OPOIFSDocument(
                 "doc340", new ByteArrayInputStream(new byte[ 340 ])));
         documents.add(
-            new POIFSDocument(
+            new OPOIFSDocument(
                 "doc5000", new ByteArrayInputStream(new byte[ 5000 ])));
         documents
-            .add(new POIFSDocument("doc0",
+            .add(new OPOIFSDocument("doc0",
                                    new ByteArrayInputStream(new byte[ 0 ])));
         documents
-            .add(new POIFSDocument("doc1",
+            .add(new OPOIFSDocument("doc1",
                                    new ByteArrayInputStream(new byte[ 1 ])));
         documents
-            .add(new POIFSDocument("doc2",
+            .add(new OPOIFSDocument("doc2",
                                    new ByteArrayInputStream(new byte[ 2 ])));
         documents
-            .add(new POIFSDocument("doc3",
+            .add(new OPOIFSDocument("doc3",
                                    new ByteArrayInputStream(new byte[ 3 ])));
         documents
-            .add(new POIFSDocument("doc4",
+            .add(new OPOIFSDocument("doc4",
                                    new ByteArrayInputStream(new byte[ 4 ])));
         documents
-            .add(new POIFSDocument("doc5",
+            .add(new OPOIFSDocument("doc5",
                                    new ByteArrayInputStream(new byte[ 5 ])));
         documents
-            .add(new POIFSDocument("doc6",
+            .add(new OPOIFSDocument("doc6",
                                    new ByteArrayInputStream(new byte[ 6 ])));
         documents
-            .add(new POIFSDocument("doc7",
+            .add(new OPOIFSDocument("doc7",
                                    new ByteArrayInputStream(new byte[ 7 ])));
         documents
-            .add(new POIFSDocument("doc8",
+            .add(new OPOIFSDocument("doc8",
                                    new ByteArrayInputStream(new byte[ 8 ])));
         documents
-            .add(new POIFSDocument("doc9",
+            .add(new OPOIFSDocument("doc9",
                                    new ByteArrayInputStream(new byte[ 9 ])));
         
         HeaderBlock              header = new HeaderBlock(POIFSConstants.SMALLER_BIG_BLOCK_SIZE_DETAILS);



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