javax.jnlp

## Class DownloadService2.ResourceSpec

- java.lang.Object
- - javax.jnlp.DownloadService2.ResourceSpec

- Enclosing interface:
    DownloadService2

      public static class DownloadService2.ResourceSpec
      extends java.lang.Object

  Specifies patterns for resource queries as arguments and holds results in `DownloadService2.getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` and `DownloadService2.getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
  For the `url` and `version` properties, standard regular expressions as documented in {code java.util.regex} are supported.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceSpec(java.lang.String url, java.lang.String version, int type)` Creates a new ResourceSpec instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getExpirationDate()` Returns the time of expiration of the resource.
    `long` | `getLastModified()` Returns the time of last modification of the resource.
    `long` | `getSize()` Returns the size of a resource.
    `int` | `getType()` Returns the type of this resource.
    `java.lang.String` | `getUrl()` Returns the URL of this resource.
    `java.lang.String` | `getVersion()` Returns the version of this resource.

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

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

- - ### Constructor Detail

    - #### ResourceSpec

          public ResourceSpec(java.lang.String url,
                              java.lang.String version,
                              int type)

      Creates a new ResourceSpec instance.
      Parameters:
        `url` - the URL pattern
        `version` - the version pattern
        `type` - the resource type. This should be one of the following constants defined in DownloadService2: ALL, APPLICATION, APPLET, EXTENSION, JAR, IMAGE, or CLASS.

  - ### Method Detail

    - #### getUrl

          public java.lang.String getUrl()

      Returns the URL of this resource.
      Returns:
        the URL of this resource

    - #### getVersion

          public java.lang.String getVersion()

      Returns the version of this resource.
      Returns:
        the version of this resource

    - #### getType

          public int getType()

      Returns the type of this resource.
      Returns:
        the type of this resource

    - #### getSize

          public long getSize()

      Returns the size of a resource. This is only useful for ResourceSpecs that have been returned as a result of `DownloadService2.getCachedResources(javax.jnlp.DownloadService2.ResourceSpec)` or `DownloadService2.getUpdateAvailableResources(javax.jnlp.DownloadService2.ResourceSpec)`.
      Returns:
        the size of a resource

    - #### getLastModified

          public long getLastModified()

      Returns the time of last modification of the resource.
      The returned value has the same semantics as the return value of System.currentTimeMillis().
      A value of `0` means unknown.
      Returns:
        the time of last modification of the resource

    - #### getExpirationDate

          public long getExpirationDate()

      Returns the time of expiration of the resource.
      The returned value has the same semantics as the return value of System.currentTimeMillis().
      A value of `0` means unknown.
      Returns:
        the time of expiration of the resource

Copyright © 1998, 2015, Oracle and/or its affiliates. All rights reserved.