From f2390589dc47d4147ab3082e48cd8cf9877e553d Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Wed, 15 Jun 2016 03:42:18 +0000 Subject: [PATCH] bug 59170: remove deprecated writeTo method in @Internal PAPBinTable git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748488 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwpf/model/PAPBinTable.java | 11 ----------- .../org/apache/poi/hwpf/model/TestPAPBinTable.java | 9 ++++----- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java index 0d9e6476a..34c29511c 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java @@ -26,7 +26,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import org.apache.poi.hwpf.model.io.HWPFFileSystem; import org.apache.poi.hwpf.model.io.HWPFOutputStream; import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.SprmIterator; @@ -387,16 +386,6 @@ public class PAPBinTable return _paragraphs; } - @Deprecated - public void writeTo( HWPFFileSystem sys, CharIndexTranslator translator ) - throws IOException - { - HWPFOutputStream wordDocumentStream = sys.getStream( "WordDocument" ); - HWPFOutputStream tableStream = sys.getStream( "1Table" ); - - writeTo( wordDocumentStream, tableStream, translator ); - } - public void writeTo( HWPFOutputStream wordDocumentStream, HWPFOutputStream tableStream, CharIndexTranslator translator ) throws IOException diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java index b9e3287f4..a642d1900 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPAPBinTable.java @@ -17,7 +17,6 @@ package org.apache.poi.hwpf.model; -import java.io.ByteArrayOutputStream; import java.util.List; import junit.framework.TestCase; @@ -25,6 +24,7 @@ import junit.framework.TestCase; import org.apache.poi.hwpf.HWPFDocFixture; import org.apache.poi.hwpf.HWPFTestDataSamples; import org.apache.poi.hwpf.model.io.HWPFFileSystem; +import org.apache.poi.hwpf.model.io.HWPFOutputStream; public final class TestPAPBinTable extends TestCase { @@ -52,10 +52,9 @@ public final class TestPAPBinTable extends TestCase null, fib.getFcPlcfbtePapx(), fib.getLcbPlcfbtePapx(), fakeTPT ); HWPFFileSystem fileSys = new HWPFFileSystem(); - - _pAPBinTable.writeTo( fileSys, fakeTPT ); - ByteArrayOutputStream tableOut = fileSys.getStream( "1Table" ); - ByteArrayOutputStream mainOut = fileSys.getStream( "WordDocument" ); + HWPFOutputStream tableOut = fileSys.getStream( "1Table" ); + HWPFOutputStream mainOut = fileSys.getStream( "WordDocument" ); + _pAPBinTable.writeTo( mainOut, tableOut, fakeTPT ); byte[] newTableStream = tableOut.toByteArray(); byte[] newMainStream = mainOut.toByteArray();