List of usage examples for org.apache.poi.util LittleEndianOutputStream LittleEndianOutputStream
public LittleEndianOutputStream(OutputStream out)
From source file:org.ddt.listener.records.DConRefRecordTest.java
License:Apache License
private void testReadWrite(byte[] data, String message) throws IOException { RecordInputStream is = TestcaseRecordInputStream.create(81, data); DConRefRecord d = new DConRefRecord(is); ByteArrayOutputStream bos = new ByteArrayOutputStream(data.length); LittleEndianOutputStream o = new LittleEndianOutputStream(bos); d.serialize(o);/* ww w . ja va 2 s . co m*/ o.flush(); assertArrayEquals(message, data, bos.toByteArray()); }
From source file:org.ddt.listener.records.DConRefRecordTest.java
License:Apache License
/** * test read-constructor-then-serialize for a single-byte self-reference style string * <p/>/*from w w w .j a va 2 s. c om*/ * @throws IOException */ @Test public void testReadWriteSBSelfRef() throws IOException { RecordInputStream is = TestcaseRecordInputStream.create(81, data3); DConRefRecord d = new DConRefRecord(is); ByteArrayOutputStream bos = new ByteArrayOutputStream(data3.length); LittleEndianOutputStream o = new LittleEndianOutputStream(bos); d.serialize(o); o.flush(); assertArrayEquals("read-write single byte self reference", data3, bos.toByteArray()); }