Package org.docx4j.org.apache.poi.util
Class LittleEndianByteArrayOutputStream
java.lang.Object
org.docx4j.org.apache.poi.util.LittleEndianByteArrayOutputStream
- All Implemented Interfaces:
DelayableLittleEndianOutput,LittleEndianOutput
public final class LittleEndianByteArrayOutputStream extends java.lang.Object implements LittleEndianOutput, DelayableLittleEndianOutput
Adapts a plain byte array to
LittleEndianOutput- Author:
- Josh Micich
-
Constructor Summary
Constructors Constructor Description LittleEndianByteArrayOutputStream(byte[] buf, int startOffset)LittleEndianByteArrayOutputStream(byte[] buf, int startOffset, int maxWriteLen) -
Method Summary
Modifier and Type Method Description LittleEndianOutputcreateDelayedOutput(int size)Creates an output stream intended for outputting a sequence of size bytes.intgetWriteIndex()voidwrite(byte[] b)voidwrite(byte[] b, int offset, int len)voidwriteByte(int v)voidwriteDouble(double v)voidwriteInt(int v)voidwriteLong(long v)voidwriteShort(int v)
-
Constructor Details
-
LittleEndianByteArrayOutputStream
public LittleEndianByteArrayOutputStream(byte[] buf, int startOffset, int maxWriteLen) -
LittleEndianByteArrayOutputStream
public LittleEndianByteArrayOutputStream(byte[] buf, int startOffset)
-
-
Method Details
-
writeByte
public void writeByte(int v)- Specified by:
writeBytein interfaceLittleEndianOutput
-
writeDouble
public void writeDouble(double v)- Specified by:
writeDoublein interfaceLittleEndianOutput
-
writeInt
public void writeInt(int v)- Specified by:
writeIntin interfaceLittleEndianOutput
-
writeLong
public void writeLong(long v)- Specified by:
writeLongin interfaceLittleEndianOutput
-
writeShort
public void writeShort(int v)- Specified by:
writeShortin interfaceLittleEndianOutput
-
write
public void write(byte[] b)- Specified by:
writein interfaceLittleEndianOutput
-
write
public void write(byte[] b, int offset, int len)- Specified by:
writein interfaceLittleEndianOutput
-
getWriteIndex
public int getWriteIndex() -
createDelayedOutput
Description copied from interface:DelayableLittleEndianOutputCreates an output stream intended for outputting a sequence of size bytes.- Specified by:
createDelayedOutputin interfaceDelayableLittleEndianOutput
-