]> source.dussan.org Git - poi.git/commitdiff
Put abstract write(OutputStream) method on POIDocument
authorNick Burch <nick@apache.org>
Tue, 20 May 2008 17:12:08 +0000 (17:12 +0000)
committerNick Burch <nick@apache.org>
Tue, 20 May 2008 17:12:08 +0000 (17:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@658350 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/POIDocument.java
src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java

index 01e50231ce0df556b07fb471e7bd508406190449..4d7e50c0fb0c292a0ce281c3a3a6733bfff5482f 100644 (file)
@@ -20,6 +20,7 @@ package org.apache.poi;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.util.Iterator;
 import java.util.List;
 
@@ -191,6 +192,11 @@ public abstract class POIDocument {
                        System.err.println("Couldn't write property set with name " + name + " as not supported by HPSF yet");
                }
        }
+       
+       /**
+        * Writes the document out to the specified output stream
+        */
+       public abstract void write(OutputStream out) throws IOException;
 
        /**
         * Copies nodes from one POIFS to the other minus the excepts
index af66163072e673f36f1a925c53d7624cff95f1ee..0f1ac882cc81a13417266947cad187ff689927b4 100644 (file)
@@ -18,6 +18,7 @@ package org.apache.poi.hdgf;
 
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 
 import org.apache.poi.POIDocument;
 import org.apache.poi.hdgf.chunks.ChunkFactory;
@@ -149,6 +150,10 @@ public class HDGFDiagram extends POIDocument {
                }
        }
        
+       public void write(OutputStream out) {
+               throw new IllegalStateException("Writing is not yet implemented, see http://poi.apache.org/hdgf/");
+       }
+       
        /**
         * For testing only
         */