Class FileReadOptions


  • public class FileReadOptions
    extends Object
    Encapsulates file reading settings, with defaults.
    Author:
    Eyal Schneider
    • Constructor Detail

      • FileReadOptions

        public FileReadOptions()
    • 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