| java.lang.Object org.apache.poi.util.ByteField
ByteField | public class ByteField implements FixedField(Code) | | representation of a byte (8-bit) field at a fixed location within a
byte array
author: Marc Johnson (mjohnson at apache dot org |
Constructor Summary | |
public | ByteField(int offset) | public | ByteField(int offset, byte value) | public | ByteField(int offset, byte[] data) | public | ByteField(int offset, byte value, byte[] data) |
ByteField | public ByteField(int offset, byte value) throws ArrayIndexOutOfBoundsException(Code) | | construct the ByteField with its offset into its containing
byte array and initialize its value
Parameters: offset - of the field within its byte array Parameters: value - the initial value exception: ArrayIndexOutOfBoundsException - if offset is negative |
ByteField | public ByteField(int offset, byte[] data) throws ArrayIndexOutOfBoundsException(Code) | | Construct the ByteField with its offset into its containing
byte array and initialize its value from its byte array
Parameters: offset - of the field within its byte array Parameters: data - the byte array to read the value from exception: ArrayIndexOutOfBoundsException - if the offset is notwithin the range of 0..(data.length - 1) |
ByteField | public ByteField(int offset, byte value, byte[] data) throws ArrayIndexOutOfBoundsException(Code) | | construct the ByteField with its offset into its containing
byte array, initialize its value, and write its value to its
byte array
Parameters: offset - of the field within its byte array Parameters: value - the initial value Parameters: data - the byte array to write the value to exception: ArrayIndexOutOfBoundsException - if the offset is notwithin the range of 0..(data.length - 1) |
get | public byte get()(Code) | | get the ByteField's current value
current value |
readFromStream | public void readFromStream(InputStream stream) throws IOException, BufferUnderrunException(Code) | | set the value from an InputStream
Parameters: stream - the InputStream from which the value is to beread exception: BufferUnderrunException - if there is not enough dataavailable from the InputStream exception: IOException - if an IOException is thrown from readingthe InputStream |
set | public void set(byte value)(Code) | | set the ByteField's current value
Parameters: value - to be set |
toString | public String toString()(Code) | | return the value as a String
the value as a String |
|
|