public class Utf8TextResource extends Object implements ResourceReference
Constructor and Description |
---|
Utf8TextResource(String text) |
Modifier and Type | Method and Description |
---|---|
File |
asFile() |
URL |
asURL() |
String |
getLocation() |
ResourceType |
getResourceType() |
boolean |
isAccessible()
Indicates whether or not the resource is accessible.
|
InputStream |
read() |
String |
toString() |
private final String text
public Utf8TextResource(String text)
public File asFile()
asFile
in interface ResourceReference
null
if the Resource cannot be represented as a Filepublic URL asURL()
asURL
in interface ResourceReference
null
if the Resource cannot be represented as a URLpublic InputStream read() throws IOException
read
in interface ResourceReference
IOException
- if unable to obtain an InputStream from the resourcepublic boolean isAccessible()
ResourceReference
isAccessible
in interface ResourceReference
true
if the file can be accessed, false
otherwisepublic String getLocation()
getLocation
in interface ResourceReference
null
for 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 URLpublic ResourceType getResourceType()
getResourceType
in interface ResourceReference
Copyright © 2024 Apache NiFi Project. All rights reserved.