Class Resource

java.lang.Object
com.nimbusds.jose.util.Resource

@Immutable public class Resource extends Object
Resource with optional associated content type.
  • Constructor Details

    • Resource

      public Resource(String content, String contentType)
      Creates a new resource with optional associated content type.
      Parameters:
      content - The resource content, empty string if none. Must not be null.
      contentType - The resource content type, null if not specified.
  • Method Details

    • getContent

      public String getContent()
      Gets the content of this resource.
      Returns:
      The content, empty string if none.
    • getContentType

      Gets the content type of this resource.
      Returns:
      The content type, null if not specified.