Interface FileIO

    • Method Detail

      • newInputFile

        InputFile newInputFile​(java.lang.String path)
        Get a InputFile instance to read bytes from the file at the given path.
      • newInputFile

        default InputFile newInputFile​(java.lang.String path,
                                       long length)
        Get a InputFile instance to read bytes from the file at the given path, with a known file length.
      • newOutputFile

        OutputFile newOutputFile​(java.lang.String path)
        Get a OutputFile instance to write bytes to the file at the given path.
      • deleteFile

        void deleteFile​(java.lang.String path)
        Delete the file at the given path.
      • properties

        default java.util.Map<java.lang.String,​java.lang.String> properties()
        Returns the property map used to configure this FileIO
        Throws:
        java.lang.UnsupportedOperationException - if this FileIO does not expose its configuration properties
      • initialize

        default void initialize​(java.util.Map<java.lang.String,​java.lang.String> properties)
        Initialize File IO from catalog properties.
        Parameters:
        properties - catalog properties
      • close

        default void close()
        Close File IO to release underlying resources.

        Calling this method is only required when this FileIO instance is no longer expected to be used, and the resources it holds need to be explicitly released to avoid resource leaks.

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable