From 055da485c8e99b00eb12c4392ac02beca3319b43 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 20 May 2008 17:12:08 +0000 Subject: [PATCH] Put abstract write(OutputStream) method on POIDocument git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@658350 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/POIDocument.java | 6 ++++++ src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/java/org/apache/poi/POIDocument.java b/src/java/org/apache/poi/POIDocument.java index 01e50231ce..4d7e50c0fb 100644 --- a/src/java/org/apache/poi/POIDocument.java +++ b/src/java/org/apache/poi/POIDocument.java @@ -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 diff --git a/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java b/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java index af66163072..0f1ac882cc 100644 --- a/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java +++ b/src/scratchpad/src/org/apache/poi/hdgf/HDGFDiagram.java @@ -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 */ -- 2.39.5