org.appng.api.model

## Interface Resource

- All Superinterfaces:
    Identifiable<Integer>, Nameable, Named<Integer>, Serializable
  All Known Implementing Classes:
    ResourceImpl, TemplateResource

      public interface Resource
      extends Named<Integer>

  A `Application` provides several `Resource`s, which are needed to load and execute the `Application`. A `Resource` is created from the physical files that come with a `Application`.
  Author:
    Matthias Herlitzius
  See Also:
    `ResourceType`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getBytes()` Returns the byte data of the `Resource`.
    `File` | `getCachedFile()` Returns a cached version of the `Resource`s file.
    `String` | `getCheckSum()` Returns the checksum of the byte data
    `ResourceType` | `getResourceType()` Returns the type of this `Resource`.
    `int` | `getSize()` Returns the size (in bytes) of this `Resource`.
    `void` | `setCachedFile(File cachedFile)` Sets the cached version of the `Resource`s file.

    - ### Methods inherited from interface org.appng.api.model.Nameable

      `getDescription, getName`

    - ### Methods inherited from interface org.appng.api.model.Identifiable

      `getId`

- - ### Method Detail

    - #### getResourceType

          ResourceType getResourceType()

      Returns the type of this `Resource`.
      Returns:
        the type

    - #### getBytes

          byte[] getBytes()

      Returns the byte data of the `Resource`.
      Returns:
        the byte data

    - #### getSize

          int getSize()

      Returns the size (in bytes) of this `Resource`.
      Returns:
        the size (in bytes)

    - #### getCachedFile

          File getCachedFile()

      Returns a cached version of the `Resource`s file.
      Returns:
        the cached file

    - #### setCachedFile

          void setCachedFile(File cachedFile)

      Sets the cached version of the `Resource`s file.
      Parameters:
        `cachedFile` - the cached file

    - #### getCheckSum

          String getCheckSum()

      Returns the checksum of the byte data
      Returns:
        the checksum of the byte data

Copyright © 2011–2023 aiticon GmbH. All rights reserved.