Beispiel #1
0
 /**
  * Set the options this this record. Container records should have the last nibble set to 0xF.
  *
  * <p
  * Note that <code>options</code> is an internal field. Use {@link #getInstance()} and
  * {@link #getVersion()} to access actual fields.
  */
 @Internal
 public void setOptions(short options) {
   // call to handle correct/incorrect values
   setVersion(fVersion.getShortValue(options));
   setInstance(fInstance.getShortValue(options));
   _options = options;
 }
Beispiel #2
0
 /**
  * Read the options field from header and return instance part of it.
  *
  * @param data the byte array to read from
  * @param offset the offset to start reading from
  * @return value of instance part of options field
  */
 protected static short readInstance(byte data[], int offset) {
   final short options = LittleEndian.getShort(data, offset);
   return fInstance.getShortValue(options);
 }
Beispiel #3
0
 /**
  * Returns the version part of the option record.
  *
  * @return The version part of the option record
  */
 public short getVersion() {
   return fVersion.getShortValue(_options);
 }
Beispiel #4
0
 /**
  * Returns the instance part of the option record.
  *
  * @return The instance part of the record
  */
 public short getInstance() {
   return fInstance.getShortValue(_options);
 }