Class File.UploadStream

    • Field Detail

      • closed

        private boolean closed
        If this file closed or not.
      • totalBytes

        private long totalBytes
        Number of bytes written to the stream.
      • file

        private File file
        The file to write to.
      • compress

        private boolean compress
        If the file should be compressed or not.
      • checkMd5

        private boolean checkMd5
        If the md5 should be checked or not.
    • Constructor Detail

      • UploadStream

        private UploadStream​(File file,
                             boolean calculateMd5,
                             boolean checkMd5,
                             boolean compress,
                             boolean utf8Detect)
                      throws IOException
        Create a new UploadStream and connect it to the given file.
        Parameters:
        file - The physical file path to which the stream will write
        calculateMd5 - TRUE if an md5 sum should be calculated from this uploadstream
        checkMd5 - If the md5 sum of the file should be checked agains the previously stored md5 sum, useful for making sure secondary storage is working properly
        utf8Detect - If set, we try to parse the file as UTF-8. If this works we set the encoding to UTF-8
        Throws:
        IOException - If there is an error during the upload