Interface Resource

All Superinterfaces:
Serializable
All Known Implementing Classes:
FileResource, HeapResource

public interface Resource extends Serializable
Represents a disposable system resource used for handling cached response bodies.
Since:
4.1
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.
    Returns an InputStream from which the response body can be read.
    long
    Returns the length in bytes of the response body.
  • Method Details

    • getInputStream

      InputStream getInputStream() throws IOException
      Returns an InputStream from which the response body can be read.
      Throws:
      IOException
    • length

      long length()
      Returns the length in bytes of the response body.
    • dispose

      void dispose()
      Indicates the system no longer needs to keep this response body and any system resources associated with it may be reclaimed.