Package com.scriptel.proscript

## Class FirmwarePage

- java.lang.Object
- - com.scriptel.proscript.FirmwarePage

-     public final class FirmwarePage
      extends java.lang.Object

  This class represents a page of firmware that can be written to the device.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `PAGE_SIZE` | The required size of a page byte array.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FirmwarePage​(int address, byte[] data)` | Constructor, creates a new page and calculates the correct checksum.
    `FirmwarePage​(int address, byte[] data, byte checksum)` | Constructor, creates a new page.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object o)` |
    `int` | `getAddress()` |
    `byte` | `getChecksum()` |
    `byte[]` | `getData()` |
    `int` | `hashCode()` |
    `void` | `recalculateChecksum()` |
    `void` | `setAddress​(int address)` |
    `void` | `setChecksum​(byte checksum)` |
    `void` | `setData​(byte[] data)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### PAGE_SIZE

          public static final int PAGE_SIZE

      The required size of a page byte array.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FirmwarePage

          public FirmwarePage​(int address,
                              byte[] data)

      Constructor, creates a new page and calculates the correct checksum.
      Parameters:
        `address` - Address of the page.
        `data` - Data in the page.

    - #### FirmwarePage

          public FirmwarePage​(int address,
                              byte[] data,
                              byte checksum)

      Constructor, creates a new page.
      Parameters:
        `address` - Address of the page.
        `data` - Data in the page.
        `checksum` - Checksum of the page.

  - ### Method Detail

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### recalculateChecksum

          public void recalculateChecksum()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getAddress

          public int getAddress()

      Returns:
        the address

    - #### setAddress

          public void setAddress​(int address)

      Parameters:
        `address` - the address to set

    - #### getData

          public byte[] getData()

      Returns:
        the data

    - #### setData

          public void setData​(byte[] data)

      Parameters:
        `data` - the data to set

    - #### getChecksum

          public byte getChecksum()

      Returns:
        the checksum

    - #### setChecksum

          public void setChecksum​(byte checksum)

      Parameters:
        `checksum` - the checksum to set