Package org.apache.poi.util
Class LittleEndianByteArrayOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.poi.util.LittleEndianByteArrayOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,DelayableLittleEndianOutput
,LittleEndianOutput
public final class LittleEndianByteArrayOutputStream extends OutputStream implements LittleEndianOutput, DelayableLittleEndianOutput
Adapts a plain byte array toLittleEndianOutput
-
-
Constructor Summary
Constructors Constructor Description LittleEndianByteArrayOutputStream(byte[] buf, int startOffset)
LittleEndianByteArrayOutputStream(byte[] buf, int startOffset, int maxWriteLen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LittleEndianOutput
createDelayedOutput(int size)
Creates an output stream intended for outputting a sequence ofsize
bytes.int
getWriteIndex()
void
write(byte[] b)
void
write(byte[] b, int offset, int len)
void
write(int b)
void
writeByte(int v)
void
writeDouble(double v)
void
writeInt(int v)
void
writeLong(long v)
void
writeShort(int v)
-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
-
-
-
Method Detail
-
writeByte
public void writeByte(int v)
- Specified by:
writeByte
in interfaceLittleEndianOutput
-
writeDouble
public void writeDouble(double v)
- Specified by:
writeDouble
in interfaceLittleEndianOutput
-
writeInt
public void writeInt(int v)
- Specified by:
writeInt
in interfaceLittleEndianOutput
-
writeLong
public void writeLong(long v)
- Specified by:
writeLong
in interfaceLittleEndianOutput
-
writeShort
public void writeShort(int v)
- Specified by:
writeShort
in interfaceLittleEndianOutput
-
write
public void write(int b)
- Specified by:
write
in classOutputStream
-
write
public void write(byte[] b)
- Specified by:
write
in interfaceLittleEndianOutput
- Overrides:
write
in classOutputStream
-
write
public void write(byte[] b, int offset, int len)
- Specified by:
write
in interfaceLittleEndianOutput
- Overrides:
write
in classOutputStream
-
getWriteIndex
public int getWriteIndex()
-
createDelayedOutput
public LittleEndianOutput createDelayedOutput(int size)
Description copied from interface:DelayableLittleEndianOutput
Creates an output stream intended for outputting a sequence ofsize
bytes.- Specified by:
createDelayedOutput
in interfaceDelayableLittleEndianOutput
-
-