Class ByteArrayResource

All Implemented Interfaces:
Serializable, IResource, IClusterable

public class ByteArrayResource extends BaseDataResource<byte[]>
An IResource for byte arrays. The byte array can be static - passed to the constructor, or dynamic - by overriding BaseDataResource.getData(org.apache.wicket.request.resource.IResource.Attributes)
Author:
Matej Knopp
See Also:
  • Constructor Details

  • Method Details

    • writeData

      protected void writeData(Response response, byte[] data)
      Description copied from class: BaseDataResource
      Writes the given data to the response
      Specified by:
      writeData in class BaseDataResource<byte[]>
      Parameters:
      response - The response to write to
      data - The data to write
    • getLength

      protected Long getLength(byte[] data)
      Specified by:
      getLength in class BaseDataResource<byte[]>
      Parameters:
      data - The data to be written
      Returns:
      The length of the data to be written. Used to set "Content-Length" response header