Package org.apache.wicket.util.resource
Class AbstractResourceStream
- java.lang.Object
-
- org.apache.wicket.util.resource.AbstractResourceStream
-
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,IClusterable,IResourceStream,IModifiable
- Direct Known Subclasses:
AbstractStringResourceStream,FileResourceStream,FileSystemResourceStream,XSLTResourceStream,ZipResourceStream
public abstract class AbstractResourceStream extends Object implements IResourceStream
- Author:
- Jonathan Locke
- See Also:
IResourceStream, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractResourceStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()Gets the mime type of this resourceLocalegetLocale()StringgetStyle()StringgetVariation()InstantlastModifiedTime()Gets the last time this modifiable thing changed.Byteslength()Gets the size of this resourcevoidsetLocale(Locale locale)This method shouldn't be used from the outside.voidsetStyle(String style)This method shouldn't be used from the outside.voidsetVariation(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.IResourceStream
close, getInputStream
-
-
-
-
Constructor Detail
-
AbstractResourceStream
public AbstractResourceStream()
-
-
Method Detail
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfaceIResourceStream- Returns:
- The Locale where this stream did resolve to
-
setLocale
public void setLocale(Locale locale)
Description copied from interface:IResourceStreamThis method shouldn't be used from the outside. It is used by the Loaders to set the resolved locale.- Specified by:
setLocalein interfaceIResourceStream- Parameters:
locale- The Locale where this stream did resolve to.
-
getStyle
public String getStyle()
- Specified by:
getStylein interfaceIResourceStream- Returns:
- The Style where this stream did resolve to
-
getVariation
public String getVariation()
- Specified by:
getVariationin interfaceIResourceStream- Returns:
- The Variation where this stream did resolve to
-
setStyle
public void setStyle(String style)
Description copied from interface:IResourceStreamThis method shouldn't be used from the outside. It is used by the Loaders to set the resolved Style.- Specified by:
setStylein interfaceIResourceStream- Parameters:
style- The style where this stream did resolve to.
-
setVariation
public void setVariation(String variation)
Description copied from interface:IResourceStreamThis method shouldn't be used from the outside. It is used by the Loaders to set the resolved variation.- Specified by:
setVariationin interfaceIResourceStream- Parameters:
variation- The Variation where this stream did resolve to.
-
length
public Bytes length()
Description copied from interface:IResourceStreamGets the size of this resource- Specified by:
lengthin interfaceIResourceStream- Returns:
- The size of this resource in the number of bytes, or
nullif unknown
-
getContentType
public String getContentType()
Description copied from interface:IResourceStreamGets the mime type of this resource- Specified by:
getContentTypein interfaceIResourceStream- Returns:
- The mime type of this resource, such as "image/jpeg" or "text/html". Return null to let ResourceStreamRequestHandler handle the Content-Type automatically
-
lastModifiedTime
public Instant lastModifiedTime()
Description copied from interface:IModifiableGets the last time this modifiable thing changed.- Specified by:
lastModifiedTimein interfaceIModifiable- Returns:
- the last modification
Timeornullif that information is not available
-
-