Package org.apache.poi.util
Interface FixedField
-
- All Known Implementing Classes:
ByteField,IntegerField,LongField,ShortField
public interface FixedFieldbehavior of a field at a fixed location within a byte array
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreadFromBytes(byte[] data)set the value from its offset into an array of bytesvoidreadFromStream(java.io.InputStream stream)set the value from an InputStreamjava.lang.StringtoString()return the value as a StringvoidwriteToBytes(byte[] data)write the value out to an array of bytes at the appropriate offset
-
-
-
Method Detail
-
readFromBytes
void readFromBytes(byte[] data) throws java.lang.ArrayIndexOutOfBoundsExceptionset the value from its offset into an array of bytes- Parameters:
data- the byte array from which the value is to be read- Throws:
java.lang.ArrayIndexOutOfBoundsException- if the offset is out of the array's valid index range
-
readFromStream
void readFromStream(java.io.InputStream stream) throws java.io.IOExceptionset the value from an InputStream- Parameters:
stream- the InputStream from which the value is to be read- Throws:
LittleEndian.BufferUnderrunException- if there is not enough data available from the InputStreamjava.io.IOException- if an IOException is thrown from reading the InputStream
-
writeToBytes
void writeToBytes(byte[] data) throws java.lang.ArrayIndexOutOfBoundsExceptionwrite the value out to an array of bytes at the appropriate offset- Parameters:
data- the array of bytes to which the value is to be written- Throws:
java.lang.ArrayIndexOutOfBoundsException- if the offset is out of the array's valid index range
-
toString
java.lang.String toString()
return the value as a String- Overrides:
toStringin classjava.lang.Object- Returns:
- the value as a String
-
-