Class ByteArrayResource

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

A repeatable resource that obtains its content from a byte array.
See Also:
  • Constructor Details

    • ByteArrayResource

      Constructor.
    • ByteArrayResource

      public ByteArrayResource(ContentType contentType, byte[] 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 byte array).
    • ByteArrayResource

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