public interface IResourceStream extends IModifiable, IClusterable, Closeable
Once a resource has been closed with a call to close(), it is normally possible to call getInputStream() again to retrieve a new input stream on the same resource.
Implementations of this interface are typically unsafe for use from multiple threads.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the resource.
|
String |
getContentType()
Gets the mime type of this resource
|
InputStream |
getInputStream()
Gets the resource stream.
|
Locale |
getLocale() |
String |
getStyle() |
String |
getVariation() |
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.
|
lastModifiedTime
String getContentType()
Bytes length()
null
if unknownInputStream getInputStream() throws ResourceStreamNotFoundException
ResourceStreamNotFoundException
close()
void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
Locale getLocale()
void setLocale(Locale locale)
locale
- The Locale where this stream did resolve to.String getStyle()
void setStyle(String style)
style
- The style where this stream did resolve to.String getVariation()
void setVariation(String variation)
variation
- The Variation where this stream did resolve to.Copyright © 2006–2021 Apache Software Foundation. All rights reserved.