Class FileResourceReference
java.lang.Object
org.apache.nifi.components.resource.FileResourceReference
- All Implemented Interfaces:
ResourceReference
-
Field Details
-
file
-
resourceType
-
-
Constructor Details
-
FileResourceReference
-
-
Method Details
-
asFile
- Specified by:
asFilein interfaceResourceReference- Returns:
- a file representation of the resource, or
nullif the Resource cannot be represented as a File
-
asURL
- Specified by:
asURLin interfaceResourceReference- Returns:
- a URL representation of the resource, or
nullif the Resource cannot be represented as a URL
-
read
- Specified by:
readin interfaceResourceReference- Returns:
- an InputStream to read the contents of the resource
- Throws:
IOException- if unable to obtain an InputStream from the resource
-
isAccessible
public boolean isAccessible()Description copied from interface:ResourceReferenceIndicates whether or not the resource is accessible. What it means for the resource to be accessible depends on the type of resource. A File resource, for example, might be accessible only if the file exists and is readable, while a URL resource might always be considered accessible, or might be accesssible only if the existence of the resource can be confirmed.- Specified by:
isAccessiblein interfaceResourceReference- Returns:
trueif the file can be accessed,falseotherwise
-
getLocation
- Specified by:
getLocationin interfaceResourceReference- Returns:
- a String representation of the location, or
nullfor a Resource that does not have an external location. For a File or a Directory, this will be the full path name; for a URL it will be the String form of the URL
-
getResourceType
- Specified by:
getResourceTypein interfaceResourceReference- Returns:
- the type of resource that is being referenced
-
equals
-
hashCode
public int hashCode() -
toString
-