Class Resource


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

      • 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 Detail

      • getContent

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

        public String getContentType()
        Gets the content type of this resource.
        Returns:
        The content type, null if not specified.