Package org.pipecraft.infra.io
Class FileReadOptions
- java.lang.Object
-
- org.pipecraft.infra.io.FileReadOptions
-
public class FileReadOptions extends Object
Encapsulates file reading settings, with defaults.- Author:
- Eyal Schneider
-
-
Constructor Summary
Constructors Constructor Description FileReadOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileReadOptionsbuffer(int bufferSize)Sets the buffer size (default = 8192)FileReadOptionsdetectCompression(String filename)Sets the compression of the file by its extensionintgetBufferSize()CompressiongetCompression()FileReadOptionssetCompression(Compression compression)Sets the compression of the file
-
-
-
Method Detail
-
setCompression
public FileReadOptions setCompression(Compression compression)
Sets the compression of the file- Parameters:
compression- the compression of the file- Returns:
- the file read options
-
detectCompression
public FileReadOptions detectCompression(String filename)
Sets the compression of the file by its extension- Parameters:
filename- The file's name- Returns:
- the file read options
-
buffer
public FileReadOptions buffer(int bufferSize)
Sets the buffer size (default = 8192)- Parameters:
bufferSize- The read buffer size, in bytes- Returns:
- this instance
-
getBufferSize
public int getBufferSize()
- Returns:
- The read buffer size, in bytes
-
getCompression
public Compression getCompression()
- Returns:
- The compression type of this file
-
-