Interface FileSource
- All Superinterfaces:
JsonSerializable,RecordSerializable,XmlSerializable
- All Known Implementing Classes:
AmazonS3FileSource,LocalFileSource,ProxyFileSource
A local or remote file to read, supplying an
InputStream for its content.-
Field Summary
Fields inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
SERIALIZED_CLASS_NAME, TYPEFields inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
XML_SERIALIZED_CLASS_NAME -
Method Summary
Modifier and TypeMethodDescriptionfromRecord(Record source) Loads this instance's state from a record and returnsthis(for fluid API call chaining).longReturns the size of the file in bytes.Returns the format of the file, or null if it is unknown.Opens a new stream to read the file's content; the caller must close it.getName()getPath()booleanisLocal()Indicates if the file is on the local file system.Methods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJson, toRecordMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Method Details
-
getName
String getName() -
getPath
String getPath() -
getUrlPath
String getUrlPath() -
isLocal
boolean isLocal()Indicates if the file is on the local file system. -
getFileSize
long getFileSize()Returns the size of the file in bytes. -
getContentType
String getContentType() -
getFileType
FileType getFileType()Returns the format of the file, or null if it is unknown. -
getInputStream
InputStream getInputStream()Opens a new stream to read the file's content; the caller must close it. -
fromRecord
Description copied from interface:RecordSerializableLoads this instance's state from a record and returnsthis(for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.- Specified by:
fromRecordin interfaceRecordSerializable- Parameters:
source-- Returns:
- this instance.
-