public class ResourceStreamWrapper extends Object implements IResourceStream
Constructor and Description |
---|
ResourceStreamWrapper(IResourceStream delegate)
Creates the wrapper around the
delegate resource stream. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the resource.
|
String |
getContentType()
Gets the mime type of this resource
|
IResourceStream |
getDelegate()
Returns the wrapped delegate.
|
InputStream |
getInputStream()
Gets the resource stream.
|
Locale |
getLocale() |
String |
getStyle() |
String |
getVariation() |
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed.
|
Bytes |
length()
Gets the size of this resource
|
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.
|
public ResourceStreamWrapper(IResourceStream delegate)
delegate
resource stream.delegate
- public IResourceStream getDelegate()
public String getContentType()
IResourceStream
getContentType
in interface IResourceStream
public Bytes length()
IResourceStream
length
in interface IResourceStream
null
if unknownpublic InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
getInputStream
in interface IResourceStream
ResourceStreamNotFoundException
IResourceStream.close()
public void close() throws IOException
IResourceStream
close
in interface Closeable
close
in interface AutoCloseable
close
in interface IResourceStream
IOException
public Locale getLocale()
getLocale
in interface IResourceStream
public void setLocale(Locale locale)
IResourceStream
setLocale
in interface IResourceStream
locale
- The Locale where this stream did resolve to.public String getStyle()
getStyle
in interface IResourceStream
public void setStyle(String style)
IResourceStream
setStyle
in interface IResourceStream
style
- The style where this stream did resolve to.public String getVariation()
getVariation
in interface IResourceStream
public void setVariation(String variation)
IResourceStream
setVariation
in interface IResourceStream
variation
- The Variation where this stream did resolve to.public Time lastModifiedTime()
IModifiable
lastModifiedTime
in interface IModifiable
Time
or
null
if that information is not availableCopyright © 2006–2022 Apache Software Foundation. All rights reserved.