oracle.cabo.share.io
Class FileInputStreamProvider
java.lang.Object
|
+--oracle.cabo.share.io.FileInputStreamProvider
- All Implemented Interfaces:
- InputStreamProvider
- public class FileInputStreamProvider
- extends java.lang.Object
- implements InputStreamProvider
An InputStreamProvider for loading files.
Method Summary |
java.lang.Object |
getCachedResult()
Returns the cached result from reading and parsing this provider. |
java.lang.String |
getDisplayName()
Returns the name of the target location, suitable for user display. |
java.lang.Object |
getIdentifier()
Returns an identifier object that uniquely identifies the target location. |
boolean |
hasSourceChanged()
Returns true if the underlying target has changed since the last call to openInputStream() |
java.io.InputStream |
openInputStream()
Return an InputStream for the target. |
void |
setCachedResult(java.lang.Object value)
Stores the cached result of reading and parsing this provider. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileInputStreamProvider
public FileInputStreamProvider(java.io.File file)
- Creates a FileInputStreamProvider.
-
- Parameters:
file
- a file object, which must be non-null
openInputStream
public java.io.InputStream openInputStream()
throws java.io.IOException
- Description copied from interface:
InputStreamProvider
- Return an InputStream for the target. This function should never return null - if a stream cannot be opened, throw an IOException.
-
- Specified by:
openInputStream
in interface InputStreamProvider
getDisplayName
public java.lang.String getDisplayName()
- Description copied from interface:
InputStreamProvider
- Returns the name of the target location, suitable for user display.
-
- Specified by:
getDisplayName
in interface InputStreamProvider
getIdentifier
public java.lang.Object getIdentifier()
- Description copied from interface:
InputStreamProvider
- Returns an identifier object that uniquely identifies the target location. If two providers return equal identifiers, that is, given:
Object identifierA = providerA.getIdentifier();
Object identifierB = providerB.getIdentifier();
... then:
if (identifierA.equals(identifierB)) ...
then the two providers must point to the same location.
-
- Specified by:
getIdentifier
in interface InputStreamProvider
hasSourceChanged
public boolean hasSourceChanged()
- Returns true if the underlying target has changed since the last call to openInputStream()
-
- Specified by:
hasSourceChanged
in interface InputStreamProvider
getCachedResult
public java.lang.Object getCachedResult()
- Description copied from interface:
InputStreamProvider
- Returns the cached result from reading and parsing this provider.
-
- Specified by:
getCachedResult
in interface InputStreamProvider
- Following copied from interface:
oracle.cabo.share.io.InputStreamProvider
-
- See Also:
CachingNameResolver
setCachedResult
public void setCachedResult(java.lang.Object value)
- Description copied from interface:
InputStreamProvider
- Stores the cached result of reading and parsing this provider.
-
- Specified by:
setCachedResult
in interface InputStreamProvider
- Following copied from interface:
oracle.cabo.share.io.InputStreamProvider
-
- See Also:
CachingNameResolver