Package hudson.util

Class CompressedFile


  • public class CompressedFile
    extends Object
    Represents write-once read-many file that can be optionally compressed to save disk space. This is used for console output and other bulky data.

    In this class, the data on the disk can be one of two states:

    1. Uncompressed, in which case the original data is available in the specified file name.
    2. Compressed, in which case the gzip-compressed data is available in the specified file name + ".gz" extension.
    Once the file is written and completed, it can be compressed asynchronously by compress().
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • CompressedFile

        public CompressedFile​(File file)
    • Method Detail

      • compress

        public void compress()
        Asynchronously schedules the compression of this file.

        Once the file is compressed, the original will be removed and the further reading will be done from the compressed stream.