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
This commit is contained in:
parent
2b7649cbd6
commit
f2390589dc
@ -26,7 +26,6 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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.model.io.HWPFOutputStream;
|
||||||
import org.apache.poi.hwpf.sprm.SprmBuffer;
|
import org.apache.poi.hwpf.sprm.SprmBuffer;
|
||||||
import org.apache.poi.hwpf.sprm.SprmIterator;
|
import org.apache.poi.hwpf.sprm.SprmIterator;
|
||||||
@ -387,16 +386,6 @@ public class PAPBinTable
|
|||||||
return _paragraphs;
|
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,
|
public void writeTo( HWPFOutputStream wordDocumentStream,
|
||||||
HWPFOutputStream tableStream, CharIndexTranslator translator )
|
HWPFOutputStream tableStream, CharIndexTranslator translator )
|
||||||
throws IOException
|
throws IOException
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package org.apache.poi.hwpf.model;
|
package org.apache.poi.hwpf.model;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
@ -25,6 +24,7 @@ import junit.framework.TestCase;
|
|||||||
import org.apache.poi.hwpf.HWPFDocFixture;
|
import org.apache.poi.hwpf.HWPFDocFixture;
|
||||||
import org.apache.poi.hwpf.HWPFTestDataSamples;
|
import org.apache.poi.hwpf.HWPFTestDataSamples;
|
||||||
import org.apache.poi.hwpf.model.io.HWPFFileSystem;
|
import org.apache.poi.hwpf.model.io.HWPFFileSystem;
|
||||||
|
import org.apache.poi.hwpf.model.io.HWPFOutputStream;
|
||||||
|
|
||||||
public final class TestPAPBinTable extends TestCase
|
public final class TestPAPBinTable extends TestCase
|
||||||
{
|
{
|
||||||
@ -52,10 +52,9 @@ public final class TestPAPBinTable extends TestCase
|
|||||||
null, fib.getFcPlcfbtePapx(), fib.getLcbPlcfbtePapx(), fakeTPT );
|
null, fib.getFcPlcfbtePapx(), fib.getLcbPlcfbtePapx(), fakeTPT );
|
||||||
|
|
||||||
HWPFFileSystem fileSys = new HWPFFileSystem();
|
HWPFFileSystem fileSys = new HWPFFileSystem();
|
||||||
|
HWPFOutputStream tableOut = fileSys.getStream( "1Table" );
|
||||||
_pAPBinTable.writeTo( fileSys, fakeTPT );
|
HWPFOutputStream mainOut = fileSys.getStream( "WordDocument" );
|
||||||
ByteArrayOutputStream tableOut = fileSys.getStream( "1Table" );
|
_pAPBinTable.writeTo( mainOut, tableOut, fakeTPT );
|
||||||
ByteArrayOutputStream mainOut = fileSys.getStream( "WordDocument" );
|
|
||||||
|
|
||||||
byte[] newTableStream = tableOut.toByteArray();
|
byte[] newTableStream = tableOut.toByteArray();
|
||||||
byte[] newMainStream = mainOut.toByteArray();
|
byte[] newMainStream = mainOut.toByteArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user