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

public Class LittleEndianByteArrayInputStream

extends ByteArrayInputStream
implements LittleEndianInput
Class Inheritance
All Implemented Interfaces
org.apache.poi.util.LittleEndianInput
Imports
java.io.ByteArrayInputStream

Adapts a plain byte array to LittleEndianInput

Field Summary

Inherited from java.io.ByteArrayInputStream:
bufcountmarkpos

Constructor Summary

AccessConstructor and Description
public
LittleEndianByteArrayInputStream(byte[]
the input buffer.
buf
,
int
the offset in the buffer of the first byte to read.
offset
,
int
the maximum number of bytes to read from the buffer.
length
)

Creates LittleEndianByteArrayInputStream that uses buf as its buffer array.

public
LittleEndianByteArrayInputStream(byte[]
the input buffer.
buf
,
int
the offset in the buffer of the first byte to read.
offset
)

Creates LittleEndianByteArrayInputStream that uses buf as its buffer array.

public
LittleEndianByteArrayInputStream(byte[]
the input buffer.
buf
)

Creates a LittleEndianByteArrayInputStream so that it uses buf as its buffer array.

Method Summary

Modifier and TypeMethod and Description
protected void
public int
public void
limit(int
the new limit - is truncated to length of internal buffer
size
)

Change the limit of the ByteArrayInputStream

public byte
public double
public void
readFully(byte[] buffer, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readFully.

public void
public int
public long
public void
readPlain(byte[]
the byte array to receive the bytes
buf
,
int
the start offset into the byte array
off
,
int
the amount of bytes to fill
len
)

Implements org.apache.poi.util.LittleEndianInput.readPlain.

Usually acts the same as readFully(byte[], int, int), but for an encrypted stream the raw (unencrypted) data is filled

public short
public int
public long
public int
public void
setReadIndex(int pos)

Inherited from java.io.ByteArrayInputStream:
availableclosemarkmarkSupportedreadreadreadAllBytesreadNBytesresetskiptransferTo

Constructor Detail

LittleEndianByteArrayInputStreamback to summary
public LittleEndianByteArrayInputStream(byte[] buf, int offset, int length)

Creates LittleEndianByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is the minimum of offset+length and buf.length. The buffer array is not copied. The buffer's mark is set to the specified offset.

Parameters
buf:byte[]

the input buffer.

offset:int

the offset in the buffer of the first byte to read.

length:int

the maximum number of bytes to read from the buffer.

LittleEndianByteArrayInputStreamback to summary
public LittleEndianByteArrayInputStream(byte[] buf, int offset)

Creates LittleEndianByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is the minimum of offset+buf.length and buf.length. The buffer array is not copied. The buffer's mark is set to the specified offset.

Parameters
buf:byte[]

the input buffer.

offset:int

the offset in the buffer of the first byte to read.

LittleEndianByteArrayInputStreamback to summary
public LittleEndianByteArrayInputStream(byte[] buf)

Creates a LittleEndianByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied. The initial value of pos is 0 and the initial value of count is the length of buf.

Parameters
buf:byte[]

the input buffer.

Method Detail

checkPositionback to summary
protected void checkPosition(int i)
getReadIndexback to summary
public int getReadIndex()
limitback to summary
public void limit(int size)

Change the limit of the ByteArrayInputStream

Parameters
size:int

the new limit - is truncated to length of internal buffer

readByteback to summary
public byte readByte()

Implements org.apache.poi.util.LittleEndianInput.readByte.

Annotations
@Override
readDoubleback to summary
public double readDouble()

Implements org.apache.poi.util.LittleEndianInput.readDouble.

Annotations
@Override
readFullyback to summary
public void readFully(byte[] buffer, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readFully.

Annotations
@Override
readFullyback to summary
public void readFully(byte[] buffer)

Implements org.apache.poi.util.LittleEndianInput.readFully.

Annotations
@Override
readIntback to summary
public int readInt()

Implements org.apache.poi.util.LittleEndianInput.readInt.

Annotations
@Override
readLongback to summary
public long readLong()

Implements org.apache.poi.util.LittleEndianInput.readLong.

Annotations
@Override
readPlainback to summary
public void readPlain(byte[] buf, int off, int len)

Implements org.apache.poi.util.LittleEndianInput.readPlain.

Doc from org.apache.poi.util.LittleEndianInput.readPlain.

Usually acts the same as readFully(byte[], int, int), but for an encrypted stream the raw (unencrypted) data is filled

Parameters
buf:byte[]

the byte array to receive the bytes

off:int

the start offset into the byte array

len:int

the amount of bytes to fill

Annotations
@Override
readShortback to summary
public short readShort()

Implements org.apache.poi.util.LittleEndianInput.readShort.

Annotations
@Override
readUByteback to summary
public int readUByte()

Implements org.apache.poi.util.LittleEndianInput.readUByte.

Annotations
@Override
readUIntback to summary
public long readUInt()
readUShortback to summary
public int readUShort()

Implements org.apache.poi.util.LittleEndianInput.readUShort.

Annotations
@Override
setReadIndexback to summary
public void setReadIndex(int pos)