public class FileSystemResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream
IResourceStream,
IModifiable,
Serialized Form| Constructor and Description |
|---|
FileSystemResourceStream(File file)
Constructor.
|
FileSystemResourceStream(File file)
Constructor.
|
FileSystemResourceStream(Path path)
Constructor.
|
| 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.
|
Path |
getPath() |
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 FileSystemResourceStream(Path path)
path - Path containing resourcepublic FileSystemResourceStream(File file)
file - File containing resourcepublic InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStreamgetInputStream in interface IResourceStreamResourceStreamNotFoundExceptionIResourceStream.close()public void close()
throws IOException
IResourceStreamclose in interface Closeableclose in interface AutoCloseableclose in interface IResourceStreamIOExceptionpublic String getContentType()
IResourceStreamgetContentType in interface IResourceStreamgetContentType in class AbstractResourceStreampublic final Path getPath()
public Time lastModifiedTime()
IModifiablelastModifiedTime in interface IModifiablelastModifiedTime in class AbstractResourceStreamTime or
null if that information is not availablepublic Bytes length()
IResourceStreamlength in interface IResourceStreamlength in class AbstractResourceStreamnull if unknownpublic String locationAsString()
locationAsString in interface IFixedLocationResourceStreamCopyright © 2006–2021 Apache Software Foundation. All rights reserved.