public class WebExternalResourceStream extends AbstractResourceStream
IResourceStream
that reads data from a file in the web applicationConstructor and Description |
---|
WebExternalResourceStream(String url)
Construct.
|
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.
|
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed.
|
Bytes |
length()
Gets the size of this resource
|
getLocale, getStyle, getVariation, setLocale, setStyle, setVariation
public WebExternalResourceStream(String url)
url
- the relative url of the external resourcepublic Bytes length()
IResourceStream
length
in interface IResourceStream
length
in class AbstractResourceStream
null
if unknownpublic void close() throws IOException
IResourceStream
IOException
public Time lastModifiedTime()
IModifiable
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractResourceStream
Time
or
null
if that information is not availablepublic String getContentType()
IResourceStream
getContentType
in interface IResourceStream
getContentType
in class AbstractResourceStream
public InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
ResourceStreamNotFoundException
IResourceStream.close()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.