|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.resource.AbstractResource
org.apache.wicket.request.resource.ByteArrayResource
public class ByteArrayResource
An IResource
for byte arrays. The byte array can be static - passed to the constructor,
or dynamic - by overriding
getData(org.apache.wicket.request.resource.IResource.Attributes)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.AbstractResource |
---|
AbstractResource.ResourceResponse, AbstractResource.WriteCallback |
Nested classes/interfaces inherited from interface org.apache.wicket.request.resource.IResource |
---|
IResource.Attributes |
Constructor Summary | |
---|---|
ByteArrayResource(String contentType)
Creates a ByteArrayResource which will provide its data dynamically with
getData(org.apache.wicket.request.resource.IResource.Attributes) |
|
ByteArrayResource(String contentType,
byte[] array)
Creates a Resource from the given byte array with its content type |
|
ByteArrayResource(String contentType,
byte[] array,
String filename)
Creates a Resource from the given byte array with its content type |
Method Summary | |
---|---|
protected void |
configureResponse(AbstractResource.ResourceResponse response,
IResource.Attributes attributes)
|
protected byte[] |
getData(IResource.Attributes attributes)
Gets the data for this resource. |
protected AbstractResource.ResourceResponse |
newResourceResponse(IResource.Attributes attributes)
Override this method to return a AbstractResource.ResourceResponse for the request. |
Methods inherited from class org.apache.wicket.request.resource.AbstractResource |
---|
configureCache, respond, setResponseHeaders |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayResource(String contentType)
ByteArrayResource
which will provide its data dynamically with
getData(org.apache.wicket.request.resource.IResource.Attributes)
contentType
- The Content type of the array.public ByteArrayResource(String contentType, byte[] array)
contentType
- The Content type of the array.array
- The binary contentpublic ByteArrayResource(String contentType, byte[] array, String filename)
contentType
- The Content type of the array.array
- The binary contentfilename
- The filename that will be set as the Content-Disposition header.Method Detail |
---|
protected void configureResponse(AbstractResource.ResourceResponse response, IResource.Attributes attributes)
protected AbstractResource.ResourceResponse newResourceResponse(IResource.Attributes attributes)
AbstractResource
AbstractResource.ResourceResponse
for the request.
newResourceResponse
in class AbstractResource
attributes
- request attributes
AbstractResource.newResourceResponse(org.apache.wicket.request.resource.IResource.Attributes)
protected byte[] getData(IResource.Attributes attributes)
attributes
- the context bringing the request, response and the parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |