Class StringResource

java.lang.Object
org.apache.juneau.http.classic.resource.BasicResource<StringResource>
org.apache.juneau.http.classic.resource.StringResource
All Implemented Interfaces:
HttpEntity, HttpResource
Direct Known Subclasses:
StringResource.Unmodifiable

A self contained, repeatable resource that obtains its content from a String.
See Also:
  • Constructor Details

    • StringResource

      public StringResource()
      Constructor.
    • StringResource

      public StringResource(ContentType contentType, String contents)
      Constructor.
      Parameters:
      contentType - The entity content type. Can be null to omit an explicit Content-Type header.
      contents - The entity contents. Can be null (treated as an empty string).
    • StringResource

      protected StringResource(StringResource copyFrom)
      Copy constructor.
      Parameters:
      copyFrom - The bean being copied. Must not be null.
  • Method Details