Top Description Fields Constructors Methods
org.apache.poi.util

public final Class LittleEndianByteArrayOutputStream

extends OutputStream
implements LittleEndianOutput, DelayableLittleEndianOutput
Class Inheritance
All Implemented Interfaces
org.apache.poi.util.DelayableLittleEndianOutput, org.apache.poi.util.LittleEndianOutput
Imports
java.io.OutputStream

Adapts a plain byte array to LittleEndianOutput

Field Summary

Modifier and TypeField and Description
private final byte[]
private final int
private int

Constructor Summary

AccessConstructor and Description
public
LittleEndianByteArrayOutputStream(byte[] buf, int startOffset, int maxWriteLen)

public
LittleEndianByteArrayOutputStream(byte[] buf, int startOffset)

Method Summary

Modifier and TypeMethod and Description
private void
public LittleEndianOutput
createDelayedOutput(int size)

Implements org.apache.poi.util.DelayableLittleEndianOutput.createDelayedOutput.

Creates an output stream intended for outputting a sequence of size bytes.

public int
public void
write(int
the byte.
b
)

Implements abstract java.io.OutputStream.write.

Writes the specified byte to this output stream.

public void
write(byte[]
the data.
b
)

Overrides java.io.OutputStream.write.

Implements org.apache.poi.util.LittleEndianOutput.write.

Writes b.length bytes from the specified byte array to this output stream.

public void
write(byte[]
the data.
b
,
int
the start offset in the data.
offset
,
int
the number of bytes to write.
len
)

Overrides java.io.OutputStream.write.

Implements org.apache.poi.util.LittleEndianOutput.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

public void
public void
public void
public void
public void
Inherited from java.io.OutputStream:
closeflushnullOutputStream

Field Detail

_bufback to summary
private final byte[] _buf
_endIndexback to summary
private final int _endIndex
_writeIndexback to summary
private int _writeIndex

Constructor Detail

LittleEndianByteArrayOutputStreamback to summary
public LittleEndianByteArrayOutputStream(byte[] buf, int startOffset, int maxWriteLen)
LittleEndianByteArrayOutputStreamback to summary
public LittleEndianByteArrayOutputStream(byte[] buf, int startOffset)

Method Detail

checkPositionback to summary
private void checkPosition(int i)
createDelayedOutputback to summary
public LittleEndianOutput createDelayedOutput(int size)

Implements org.apache.poi.util.DelayableLittleEndianOutput.createDelayedOutput.

Doc from org.apache.poi.util.DelayableLittleEndianOutput.createDelayedOutput.

Creates an output stream intended for outputting a sequence of size bytes.

Annotations
@Override
getWriteIndexback to summary
public int getWriteIndex()
writeback to summary
public void write(int b)

Implements abstract java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Parameters
b:int

the byte.

Annotations
@Override
writeback to summary
public void write(byte[] b)

Overrides java.io.OutputStream.write.

Implements org.apache.poi.util.LittleEndianOutput.write.

Doc from java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).

Parameters
b:byte[]

the data.

Annotations
@Override
writeback to summary
public void write(byte[] b, int offset, int len)

Overrides java.io.OutputStream.write.

Implements org.apache.poi.util.LittleEndianOutput.write.

Doc from java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

Parameters
b:byte[]

the data.

offset:int

the start offset in the data.

len:int

the number of bytes to write.

Annotations
@Override
writeByteback to summary
public void writeByte(int v)

Implements org.apache.poi.util.LittleEndianOutput.writeByte.

Annotations
@Override
writeDoubleback to summary
public void writeDouble(double v)

Implements org.apache.poi.util.LittleEndianOutput.writeDouble.

Annotations
@Override
writeIntback to summary
public void writeInt(int v)

Implements org.apache.poi.util.LittleEndianOutput.writeInt.

Annotations
@Override
writeLongback to summary
public void writeLong(long v)

Implements org.apache.poi.util.LittleEndianOutput.writeLong.

Annotations
@Override
writeShortback to summary
public void writeShort(int v)

Implements org.apache.poi.util.LittleEndianOutput.writeShort.

Annotations
@Override