Package com.scriptel.proscript.firmware

## Class FWFirmwarePackage

- java.lang.Object
- - com.scriptel.proscript.firmware.FWFirmwarePackage

- All Implemented Interfaces:
    `FirmwarePackage`

      public class FWFirmwarePackage
      extends java.lang.Object
      implements FirmwarePackage

  This class represents a firmware package in the newer firmware format.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FWFirmwarePackage()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getPageCount()` | This method gets the number of pages in the package.
    `java.util.List<FirmwareRestriction>` | `getRestrictions()` | This method gets a list of restrictions that must be met before a device can accept firmware.
    `FirmwarePage` | `nextPage()` | This function when implemented should return the next page of firmware from the file opened with readStream().
    `void` | `readStream​(java.io.InputStream in)` | This function when implemented should read in a firmware file of a particular type.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FWFirmwarePackage

          public FWFirmwarePackage()

  - ### Method Detail

    - #### readStream

          public void readStream​(java.io.InputStream in)
                          throws java.io.IOException

      Description copied from interface: `FirmwarePackage`
      This function when implemented should read in a firmware file of a particular type.
      Specified by:
        `readStream` in interface `FirmwarePackage`
      Parameters:
        `in` - Input stream to read firmware from.
      Throws:
        `java.io.IOException` - Thrown in the event of a problem.

    - #### nextPage

          public FirmwarePage nextPage()

      Description copied from interface: `FirmwarePackage`
      This function when implemented should return the next page of firmware from the file opened with readStream(). The function should return null at the end of the file.
      Specified by:
        `nextPage` in interface `FirmwarePackage`
      Returns:
        The next firmware page from the file. Null when end of file.

    - #### getPageCount

          public int getPageCount()

      Description copied from interface: `FirmwarePackage`
      This method gets the number of pages in the package.
      Specified by:
        `getPageCount` in interface `FirmwarePackage`
      Returns:
        Number of pages contained in the package.

    - #### getRestrictions

          public java.util.List<FirmwareRestriction> getRestrictions()

      Description copied from interface: `FirmwarePackage`
      This method gets a list of restrictions that must be met before a device can accept firmware.
      Specified by:
        `getRestrictions` in interface `FirmwarePackage`
      Returns:
        List of restrictions.