Top Description Methods
org.apache.poi.util

public Interface FixedField

Known Direct Implementers
org.apache.poi.util.IntegerField, org.apache.poi.util.LongField, org.apache.poi.util.ShortField, org.apache.poi.util.ByteField
Imports
org.apache.poi.util.LittleEndian.BufferUnderrunException, java.io.*

behavior of a field at a fixed location within a byte array

Method Summary

Modifier and TypeMethod and Description
public void
readFromBytes(byte[]
the byte array from which the value is to be read
data
)

set the value from its offset into an array of bytes

public void
readFromStream(InputStream
the InputStream from which the value is to be read
stream
)

set the value from an InputStream

public String

Returns:

the value as a String
toString
()

return the value as a String

public void
writeToBytes(byte[]
the array of bytes to which the value is to be written
data
)

write the value out to an array of bytes at the appropriate offset

Method Detail

readFromBytesback to summary
public void readFromBytes(byte[] data) throws ArrayIndexOutOfBoundsException

set the value from its offset into an array of bytes

Parameters
data:byte[]

the byte array from which the value is to be read

Exceptions
ArrayIndexOutOfBoundsException:
if the offset is out of the array's valid index range
readFromStreamback to summary
public void readFromStream(InputStream stream) throws IOException

set the value from an InputStream

Parameters
stream:InputStream

the InputStream from which the value is to be read

Exceptions
IOException:
if an IOException is thrown from reading the InputStream
BufferUnderrunException:
if there is not enough data available from the InputStream
toStringback to summary
public String toString()

return the value as a String

Returns:String

the value as a String

writeToBytesback to summary
public void writeToBytes(byte[] data) throws ArrayIndexOutOfBoundsException

write the value out to an array of bytes at the appropriate offset

Parameters
data:byte[]

the array of bytes to which the value is to be written

Exceptions
ArrayIndexOutOfBoundsException:
if the offset is out of the array's valid index range