Interface SparkStreamUtils


public interface SparkStreamUtils
  • Method Details

    • copyStream

      long copyStream(InputStream in, OutputStream out, boolean closeStreams, boolean transferToEnabled)
      Copy all data from an InputStream to an OutputStream. NIO way of file stream to file stream copying is disabled by default unless explicitly set transferToEnabled as true, the parameter transferToEnabled should be configured by spark.file.transferTo = [true|false].
      Parameters:
      in - (undocumented)
      out - (undocumented)
      closeStreams - (undocumented)
      transferToEnabled - (undocumented)
      Returns:
      (undocumented)
    • copyFileStreamNIO

      void copyFileStreamNIO(FileChannel input, WritableByteChannel output, long startPosition, long bytesToCopy)