Class ClickHouseFile

    • Field Detail

      • NULL

        public static final ClickHouseFile NULL
        Null file which has no compression and format.
    • Method Detail

      • asInputStream

        public ClickHouseInputStream asInputStream()
        Creates an input stream for reading the file.
        Returns:
        non-null input stream for reading the file
      • asOutputStream

        public ClickHouseOutputStream asOutputStream()
        Creates an output stream for writing data into the file.
        Returns:
        non-null input stream for writing data into the file
      • getFile

        public File getFile()
        Gets file, which only works when isAvailable() returns true.
        Returns:
        non-null file, except null for NULL
      • getFormat

        public ClickHouseFormat getFormat()
        Gets file format, which could be null. Use hasFormat() to check first.
        Returns:
        file format, could be null
      • getCompressionAlgorithm

        public ClickHouseCompression getCompressionAlgorithm()
        Gets compression algorithm.
        Returns:
        non-null compression algorithm
      • getCompressionLevel

        public int getCompressionLevel()
        Gets compression level.
        Returns:
        compression level, which is always greater than or equal to zero
      • hasFormat

        public boolean hasFormat()
        Checks if the file format is defined or not.
        Returns:
        true if the file format is defined; false otherwise
      • isAvailable

        public boolean isAvailable()
        Checks if the file is available or not.
        Returns:
        true if the file is available; false otherwise
      • isCompressed

        public boolean isCompressed()
        Checks if the file is compressed or not.
        Returns:
        true if the file is compressed; false otherwise