|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.resource.AbstractResourceStreamWriter
public abstract class AbstractResourceStreamWriter
Base implementation of an IResourceStreamWriter so that you only have to override the
IResourceStreamWriter.write(java.io.OutputStream). Don't forget to overwrite the
IResourceStream.length() method if you do know the total
length that will be generated.
IResourceStreamWriter,
Serialized Form| Constructor Summary | |
|---|---|
AbstractResourceStreamWriter()
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the resource. |
String |
getContentType()
Gets the mime type of this resource |
InputStream |
getInputStream()
this method should not be used as it is not required for resource writers |
Locale |
getLocale()
|
String |
getStyle()
|
String |
getVariation()
|
Time |
lastModifiedTime()
Just returns now. |
Bytes |
length()
Default implementation to returns null, i.e. |
void |
setLocale(Locale locale)
This method shouldn't be used from the outside. |
void |
setStyle(String style)
This method shouldn't be used from the outside. |
void |
setVariation(String variation)
This method shouldn't be used from the outside. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.util.resource.IResourceStreamWriter |
|---|
write |
| Constructor Detail |
|---|
public AbstractResourceStreamWriter()
| Method Detail |
|---|
public Bytes length()
null, i.e. chunked-encoding will be used.
Do override this if you know the length up front.
length in interface IResourceStreamnull if unknownpublic Locale getLocale()
getLocale in interface IResourceStreampublic void setLocale(Locale locale)
IResourceStream
setLocale in interface IResourceStreamlocale - The Locale where this stream did resolve to.public Time lastModifiedTime()
lastModifiedTime in interface IModifiableTime or
null if that information is not availablepublic final InputStream getInputStream()
getInputStream in interface IResourceStreamIResourceStream.close()
public void close()
throws IOException
This implementation does nothing.
close in interface Closeableclose in interface IResourceStreamIOException - if an error occurred.public String getContentType()
IResourceStream
getContentType in interface IResourceStreampublic String getStyle()
getStyle in interface IResourceStreampublic void setStyle(String style)
IResourceStream
setStyle in interface IResourceStreamstyle - The style where this stream did resolve to.public String getVariation()
getVariation in interface IResourceStreampublic void setVariation(String variation)
IResourceStream
setVariation in interface IResourceStreamvariation - The Variation where this stream did resolve to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||