Class ProxyFileSource
java.lang.Object
com.northconcepts.datapipeline.foundations.file.ProxyFileSource
- All Implemented Interfaces:
JsonSerializable,RecordSerializable,XmlSerializable,FileSource
A
FileSource that delegates its file methods and record serialization to a nested file source; subclasses
override selected methods.-
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 -
Constructor Summary
Constructors -
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.toRecord()Converts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.northconcepts.datapipeline.core.RecordSerializable
fromJson, fromJson, toJson, toJson, toJsonMethods inherited from interface com.northconcepts.datapipeline.core.XmlSerializable
fromXml, fromXml, fromXmlElement, toXml, toXml, toXml, toXml, toXml, toXmlElement
-
Constructor Details
-
ProxyFileSource
-
-
Method Details
-
getNestedFileSource
-
getName
- Specified by:
getNamein interfaceFileSource
-
getPath
- Specified by:
getPathin interfaceFileSource
-
getUrlPath
- Specified by:
getUrlPathin interfaceFileSource
-
isLocal
public boolean isLocal()Description copied from interface:FileSourceIndicates if the file is on the local file system.- Specified by:
isLocalin interfaceFileSource
-
getFileSize
public long getFileSize()Description copied from interface:FileSourceReturns the size of the file in bytes.- Specified by:
getFileSizein interfaceFileSource
-
getContentType
- Specified by:
getContentTypein interfaceFileSource
-
getFileType
Description copied from interface:FileSourceReturns the format of the file, or null if it is unknown.- Specified by:
getFileTypein interfaceFileSource
-
getInputStream
Description copied from interface:FileSourceOpens a new stream to read the file's content; the caller must close it.- Specified by:
getInputStreamin interfaceFileSource
-
toRecord
Description copied from interface:RecordSerializableConverts this object's state to a record thatRecordSerializable.fromRecord(Record)can load.- Specified by:
toRecordin interfaceRecordSerializable
-
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 interfaceFileSource- Specified by:
fromRecordin interfaceRecordSerializable- Parameters:
source-- Returns:
- this instance.
-