com.ibm.jzos.fields.daa

Class BinarySignedIntField

    • Constructor Detail

      • BinarySignedIntField

        public BinarySignedIntField(int offset)
        Construct an instance with a field width = DEFAULT_FIELD_WIDTH = 4.
        Parameters:
        offset - int the offset in some byte array to the start of this field.
      • BinarySignedIntField

        public BinarySignedIntField(int offset,
                                    int length)
        Construct an signed instance with a given offset and length.
        Parameters:
        offset - int the offset in some byte array to the start of this field.
        length - int the size of the field in bytes
    • Method Detail

      • getInt

        public int getInt(byte[] buffer)
        Description copied from class: BinaryAsIntField
        Answer an int from the given byte array buffer, at the offset of this field.
        Specified by:
        getInt in interface IntAccessor
        Overrides:
        getInt in class BinaryAsIntField
        Parameters:
        buffer - the byte array
        Returns:
        int
      • getInt

        public int getInt(byte[] buffer,
                          int bufOffset)
        Description copied from class: BinaryAsIntField
        Answer an int from the given byte array buffer, at the bufOffset + offset of this field.
        Specified by:
        getInt in interface IntAccessor
        Overrides:
        getInt in class BinaryAsIntField
        Parameters:
        buffer - the byte array
        bufOffset - the additional offset into the byte array
        Returns:
        int
      • putInt

        public void putInt(int value,
                           byte[] buffer)
        Description copied from class: BinaryAsIntField
        Put a signed int into the given byte array buffer, at the offset of this field.
        Specified by:
        putInt in interface IntAccessor
        Overrides:
        putInt in class BinaryAsIntField
        Parameters:
        value - the signed int value
        buffer - the byte array
      • putInt

        public void putInt(int value,
                           byte[] buffer,
                           int bufOffset)
        Description copied from class: BinaryAsIntField
        Put a signed int into thegiven byte array buffer, at the bufOffset + offset of this field.
        Specified by:
        putInt in interface IntAccessor
        Overrides:
        putInt in class BinaryAsIntField
        Parameters:
        value - the signed int value
        buffer - the byte array
        bufOffset - the additional offset into the byte array
� Copyright IBM Corporation 2005, 2022.