public class FileResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream
IResourceStream,
IModifiable,
Serialized Form| Constructor and Description |
|---|
FileResourceStream(File file)
Constructor.
|
FileResourceStream(File file)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this resource.
|
String |
getContentType()
Gets the mime type of this resource
|
File |
getFile() |
InputStream |
getInputStream()
Gets the resource stream.
|
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed.
|
Bytes |
length()
Gets the size of this resource
|
String |
locationAsString() |
String |
toString() |
getLocale, getStyle, getVariation, setLocale, setStyle, setVariationpublic FileResourceStream(File file)
file - File containing resourcepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface IResourceStreamIOExceptionpublic String getContentType()
IResourceStreamgetContentType in interface IResourceStreamgetContentType in class AbstractResourceStreampublic File getFile()
public InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStreamgetInputStream in interface IResourceStreamResourceStreamNotFoundExceptionIResourceStream.close()public Time lastModifiedTime()
IModifiablelastModifiedTime in interface IModifiablelastModifiedTime in class AbstractResourceStreamIModifiable.lastModifiedTime()public Bytes length()
IResourceStreamlength in interface IResourceStreamlength in class AbstractResourceStreamnull if unknownpublic String locationAsString()
locationAsString in interface IFixedLocationResourceStreamCopyright © 2006–2020 Apache Software Foundation. All rights reserved.