public class CharSequenceResource extends BaseDataResource<CharSequence>
IResource for CharSequences.
The char sequence can be static - passed to the constructor,
or dynamic - by overriding BaseDataResource.getData(org.apache.wicket.request.resource.IResource.Attributes)AbstractResource.ResourceResponse, AbstractResource.WriteCallbackIResource.AttributesINTERNAL_HEADERS| Constructor and Description |
|---|
CharSequenceResource(String contentType)
Creates a
CharSequenceResource which will provide its data dynamically with
BaseDataResource.getData(org.apache.wicket.request.resource.IResource.Attributes) |
CharSequenceResource(String contentType,
CharSequence data)
Creates a Resource from the given char sequence with its content type
|
CharSequenceResource(String contentType,
CharSequence data,
String filename)
Creates a Resource from the given char sequence with its content type
|
| Modifier and Type | Method and Description |
|---|---|
protected Long |
getLength(CharSequence data) |
protected void |
writeData(Response response,
CharSequence data)
Writes the given data to the response
|
configureResponse, getData, newResourceResponseconfigureCache, getCachingStrategy, respond, setResponseHeaderspublic CharSequenceResource(String contentType)
CharSequenceResource which will provide its data dynamically with
BaseDataResource.getData(org.apache.wicket.request.resource.IResource.Attributes)contentType - The Content type of the array.public CharSequenceResource(String contentType, CharSequence data)
contentType - The Content type of the array.data - The datapublic CharSequenceResource(String contentType, CharSequence data, String filename)
contentType - The Content type of the array.data - The datafilename - The filename that will be set as the Content-Disposition header.protected void writeData(Response response, CharSequence data)
BaseDataResourcewriteData in class BaseDataResource<CharSequence>response - The response to write todata - The data to writeprotected Long getLength(CharSequence data)
getLength in class BaseDataResource<CharSequence>data - The data to be writtenCopyright © 2006–2014 Apache Software Foundation. All rights reserved.