com.h3c.util.rs

## Class FileSystemResource

- java.lang.Object
- - com.h3c.util.rs.BaseResource
  - - com.h3c.util.rs.FileSystemResource

-     public class FileSystemResource
      extends BaseResource

  REST adapter for providing file-system content.

- - ### Field Summary

    - ### Fields inherited from class com.h3c.util.rs.BaseResource

      `DATE_FORMAT, DATETIME_FORMAT, DEFAULT_USER, log, NAME, NO_CACHE, REF, security, UID, uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileSystemResource()` Constructs the file system resource.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `resource(String resource)` Get the resource named in the path.
    `static void` | `setRoot(String path)` Set the root path from under which resources should be served.

    - ### Methods inherited from class com.h3c.util.rs.BaseResource

      `accepted, accepted, created, created, date, datetime, deleted, format, format, getData, getUserName, id, integer, notFound, ok, ok, redirect, ref, safeCamelCase, safeToString, serverError, serviceUnavailableError, setDefaultUserName, sid, tag, tag, tag, uid, uid, url, validate, validate, validate, warn, warn`

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

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

- - ### Constructor Detail

    - #### FileSystemResource

          public FileSystemResource()

      Constructs the file system resource.

  - ### Method Detail

    - #### setRoot

          public static void setRoot(String path)

      Set the root path from under which resources should be served.
      Parameters:
        `path` - root resource path

    - #### resource

          public javax.ws.rs.core.Response resource(String resource)

      Get the resource named in the path.
      Parameters:
        `resource` - resource path
      Returns:
        resource data

Copyright © 2014. All Rights Reserved.