Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.util
Interface FixedField

All Known Implementing Classes:
  ByteField, IntegerField, LongField, ShortField

public interface FixedField

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

Author:
  Marc Johnson (mjohnson at apache dot org

Method Summary
`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
`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

Method Detail

### readFromBytes

    public void readFromBytes(byte[] data)
                       throws java.lang.ArrayIndexOutOfBoundsException

  set 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

    public void readFromStream(java.io.InputStream stream)
                        throws java.io.IOException,
                               LittleEndian.BufferUnderrunException

  set the value from an InputStream

  Parameters:
    `stream` - the InputStream from which the value is to be read
  Throws:
    `BufferUnderrunException` - if there is not enough data available from the InputStream
    `java.io.IOException` - if an IOException is thrown from reading the InputStream
    `LittleEndian.BufferUnderrunException`

### writeToBytes

    public void writeToBytes(byte[] data)
                      throws java.lang.ArrayIndexOutOfBoundsException

  write 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

    public java.lang.String toString()

  return the value as a String

  Returns:
    the value as a String

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Apache Software Foundation.