|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.util.IntegerField
public class IntegerField
representation of an integer (32-bit) field at a fixed location within a byte array
| Constructor Summary | |
|---|---|
IntegerField(int offset)
construct the IntegerField with its offset into its containing byte array |
|
IntegerField(int offset,
byte[] data)
Construct the IntegerField with its offset into its containing byte array and initialize its value from its byte array |
|
IntegerField(int offset,
int value)
construct the IntegerField with its offset into its containing byte array and initialize its value |
|
IntegerField(int offset,
int value,
byte[] data)
construct the IntegerField with its offset into its containing byte array, initialize its value, and write the value to a byte array |
|
| Method Summary | |
|---|---|
int |
get()
get the IntegerField's current value |
void |
readFromBytes(byte[] data)
set the value from its offset into an array of bytes |
void |
readFromStream(java.io.InputStream stream)
set the value from an InputStream |
void |
set(int value)
set the IntegerField's current value |
void |
set(int value,
byte[] data)
set the IntegerField's current value and write it to a byte array |
java.lang.String |
toString()
return the value as a String |
void |
writeToBytes(byte[] data)
write the value out to an array of bytes at the appropriate offset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntegerField(int offset)
throws java.lang.ArrayIndexOutOfBoundsException
offset - of the field within its byte array
java.lang.ArrayIndexOutOfBoundsException - if the offset is
negative
public IntegerField(int offset,
int value)
throws java.lang.ArrayIndexOutOfBoundsException
offset - of the field within its byte arrayvalue - the initial value
java.lang.ArrayIndexOutOfBoundsException - if the offset is
negative
public IntegerField(int offset,
byte[] data)
throws java.lang.ArrayIndexOutOfBoundsException
offset - of the field within its byte arraydata - the byte array to read the value from
java.lang.ArrayIndexOutOfBoundsException - if the offset is not
within the range of 0..(data.length - 1)
public IntegerField(int offset,
int value,
byte[] data)
throws java.lang.ArrayIndexOutOfBoundsException
offset - of the field within its byte arrayvalue - the initial valuedata - the byte array to write the value to
java.lang.ArrayIndexOutOfBoundsException - if the offset is
negative or too large| Method Detail |
|---|
public int get()
public void set(int value)
value - to be set
public void set(int value,
byte[] data)
throws java.lang.ArrayIndexOutOfBoundsException
value - to be setdata - the byte array to write the value to
java.lang.ArrayIndexOutOfBoundsException - if the offset is too
large
public void readFromBytes(byte[] data)
throws java.lang.ArrayIndexOutOfBoundsException
readFromBytes in interface FixedFielddata - the byte array from which the value is to be read
java.lang.ArrayIndexOutOfBoundsException - if the offset is too
large
public void readFromStream(java.io.InputStream stream)
throws java.io.IOException,
LittleEndian.BufferUnderrunException
readFromStream in interface FixedFieldstream - the InputStream from which the value is to be
read
LittleEndian.BufferUnderrunException - if there is not enough data
available from the InputStream
java.io.IOException - if an IOException is thrown from reading
the InputStream
public void writeToBytes(byte[] data)
throws java.lang.ArrayIndexOutOfBoundsException
writeToBytes in interface FixedFielddata - the array of bytes to which the value is to be
written
java.lang.ArrayIndexOutOfBoundsException - if the offset is too
largepublic java.lang.String toString()
toString in interface FixedFieldtoString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||