Package org.apache.spark.util
Interface SparkStreamUtils
public interface SparkStreamUtils
- 
Method SummaryModifier and TypeMethodDescriptionvoidcopyFileStreamNIO(FileChannel input, WritableByteChannel output, long startPosition, long bytesToCopy) longcopyStream(InputStream in, OutputStream out, boolean closeStreams, boolean transferToEnabled) Copy all data from an InputStream to an OutputStream.voidreadFully(InputStream in, byte[] arr, int off, int len) toString(InputStream in) 
- 
Method Details- 
copyStreamCopy 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)
 
- 
copyFileStreamNIOvoid copyFileStreamNIO(FileChannel input, WritableByteChannel output, long startPosition, long bytesToCopy) 
- 
toString
- 
readFully
 
-