FileResource
public interface Resource
Resource
is "something" that is typically found by a
ResourceFinder
, can be open()
ed for
reading, and optionally has a lastModified()
property.
There also exists a ResourceCreator
concept which
opens a resource for writing, but that happens directly and not through an intermediate
Resource
object.
ResourceFinder
,
ResourceCreator
Modifier and Type | Method | Description |
---|---|---|
String |
getFileName() |
Returns a decorative "file name" that can be used for reporting
errors and the like.
|
long |
lastModified() |
Returns the time of the last modification, in milliseconds since
1970, or
0L if the time of the last modification cannot
be determined. |
InputStream |
open() |
Opens the resource.
|
InputStream open() throws IOException
InputStream
.IOException
String getFileName()
long lastModified()
0L
if the time of the last modification cannot
be determined.Copyright © 2001–2019. All rights reserved.