Module ibm.jzos

Class PackedUnsignedIntP5Field

All Implemented Interfaces:
Field, IntAccessor

public class PackedUnsignedIntP5Field extends PackedUnsignedIntField
  • Constructor Details

    • PackedUnsignedIntP5Field

      public PackedUnsignedIntP5Field(int offset)
  • Method Details

    • getInt

      public int getInt(byte[] buffer, int bufOffset)
      Description copied from class: PackedDecimalAsIntField
      Answer a int from the given byte array buffer, at the bufOffset + offset of this field.

      Note: the data is not checked for valid decimal digits, although the sign nibble is checked for a valid value in the range x'A'-x'F'.

      Specified by:
      getInt in interface IntAccessor
      Overrides:
      getInt in class PackedUnsignedIntField
      Parameters:
      buffer - the byte array
      bufOffset - the additional offset into the byte array
      Returns:
      int
    • getInt

      public int getInt(byte[] buffer)
      Description copied from class: PackedDecimalAsIntField
      Answer a int from the given byte array buffer, at the offset of this field.

      Note: the data is not checked for valid decimal digits, although the sign nibble is checked for a valid value in the range x'A'-x'F'.

      Specified by:
      getInt in interface IntAccessor
      Overrides:
      getInt in class PackedUnsignedIntField
      Parameters:
      buffer - the byte array
      Returns:
      int
    • putInt

      public void putInt(int value, byte[] buffer, int bufOffset) throws IllegalArgumentException
      Description copied from class: PackedDecimalAsIntField
      Put a int into the given byte array buffer, at the bufOffset + offset of this field.

      Note: If the field is unsigned, a x'F' is supplied as the sign nibble in the field.

      Specified by:
      putInt in interface IntAccessor
      Overrides:
      putInt in class PackedUnsignedIntField
      Parameters:
      value - the signed int value
      buffer - the byte array
      bufOffset - the additional offset into the byte array
      Throws:
      IllegalArgumentException - if the value is out of range
    • putInt

      public void putInt(int value, byte[] buffer) throws IllegalArgumentException
      Description copied from class: PackedDecimalAsIntField
      Put a int into the given byte array buffer, at the offset of this field.

      Note: If the field is unsigned, a x'F' is supplied as the sign nibble in the field.

      Specified by:
      putInt in interface IntAccessor
      Overrides:
      putInt in class PackedUnsignedIntField
      Parameters:
      value - the signed int value
      buffer - the byte array
      Throws:
      IllegalArgumentException - if the value is out of range