Interface FileSink
- All Superinterfaces:
JsonSerializable,RecordSerializable,XmlSerializable
- All Known Implementing Classes:
AmazonS3FileSink,LocalFileSink
A local or remote file to write, supplying an
OutputStream 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.getName()Opens a new stream to write the file's content; the caller must close it.getPath()booleanisAppend()Indicates ifgetOutputStream()appends to an existing file instead of replacing it.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. -
isAppend
boolean isAppend()Indicates ifgetOutputStream()appends to an existing file instead of replacing it. -
getOutputStream
OutputStream getOutputStream()Opens a new stream to write 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.
-