java.lang.Object
org.apache.wicket.util.resource.ResourceStreamWrapper
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,IClusterable,IResourceStream,IModifiable
A IResourceStream that wraps another resource stream
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResourceStreamWrapper(IResourceStream delegate) Creates the wrapper around thedelegateresource stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the resource.Gets the mime type of this resourceReturns the wrapped delegate.Gets the resource stream.getStyle()Gets the last time this modifiable thing changed.length()Gets the size of this resourcevoidThis method shouldn't be used from the outside.voidThis method shouldn't be used from the outside.voidsetVariation(String variation) This method shouldn't be used from the outside.
-
Constructor Details
-
ResourceStreamWrapper
Creates the wrapper around thedelegateresource stream.- Parameters:
delegate-
-
-
Method Details
-
getDelegate
Returns the wrapped delegate.- Returns:
- the wrapped delegate.
-
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
-
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
-
getInputStream
Description copied from interface:IResourceStreamGets the resource stream. You should not directly close this stream. Instead call the close() method on IResourceStream.- Specified by:
getInputStreamin interfaceIResourceStream- Returns:
- Returns the inputStream.
- Throws:
ResourceStreamNotFoundException- See Also:
-
close
Description copied from interface:IResourceStreamCloses the resource. Normally, this includes closing any underlying input stream returned by getInputStream().- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceIResourceStream- Throws:
IOException
-
getLocale
- Specified by:
getLocalein interfaceIResourceStream- Returns:
- The Locale where this stream did resolve to
-
setLocale
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
- Specified by:
getStylein interfaceIResourceStream- Returns:
- The Style where this stream did resolve to
-
setStyle
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.
-
getVariation
- Specified by:
getVariationin interfaceIResourceStream- Returns:
- The Variation where this stream did resolve to
-
setVariation
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.
-
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
-