All Superinterfaces:
JsonSerializable, RecordSerializable, XmlSerializable
All Known Implementing Classes:
AmazonS3FileSink, LocalFileSink

public interface FileSink extends RecordSerializable, XmlSerializable
A local or remote file to write, supplying an OutputStream for its content.
  • 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 if getOutputStream() 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

      FileSink fromRecord(Record source)
      Description copied from interface: RecordSerializable
      Loads this instance's state from a record and returns this (for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.
      Specified by:
      fromRecord in interface RecordSerializable
      Parameters:
      source -
      Returns:
      this instance.