Documentation of 'org.hsqldb.lib.tar.TarGenerator' Java class
TarGenerator
org.hsqldb.lib.tar

Class TarGenerator



  • public class TarGenerator
    extends java.lang.Object
    Generates a tar archive from specified Files and InputStreams. Modified by fredt for hot backup
    Since:
    2.0.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      TarGenerator(java.io.File inFile, boolean overWrite, java.lang.Integer blocksPerRecord)
      Compression is determined directly by the suffix of the file name in the specified path.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      long getPaxThreshold() 
      static void main(java.lang.String[] sa)
      Creates specified tar file to contain specified files, or stdin, using default blocks-per-record and replacing tar file if it already exists.
      void queueEntry(java.io.File file) 
      void queueEntry(java.lang.String entryPath, java.io.File file) 
      void queueEntry(java.lang.String entryPath, java.io.InputStream inStream, int maxBytes)
      This method does not support Pax Interchange Format, nor data sizes greater than 2G.
      void queueEntry(java.lang.String entryPath, InputStreamInterface is) 
      void setPaxThreshold(long paxThreshold)
      When data file is this size or greater, in bytes, a Pix Interchange Format 'x' record will be created and used for the file entry.
      void write()
      This method does release all of the streams, even if there is a failure.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TarGenerator

        public TarGenerator(java.io.File inFile,
                            boolean overWrite,
                            java.lang.Integer blocksPerRecord)
                     throws java.io.IOException
        Compression is determined directly by the suffix of the file name in the specified path.
        Parameters:
        inFile - Absolute or relative (from user.dir) File for tar file to be created. getName() Suffix must indicate tar file and may indicate a compression method.
        overWrite - True to replace an existing file of same path.
        blocksPerRecord - Null will use default tar value.
        Throws:
        java.io.IOException
    • Method Detail

      • main

        public static void main(java.lang.String[] sa)
                         throws java.io.IOException,
                                TarMalformatException
        Creates specified tar file to contain specified files, or stdin, using default blocks-per-record and replacing tar file if it already exists.
        Throws:
        java.io.IOException
        TarMalformatException
      • setPaxThreshold

        public void setPaxThreshold(long paxThreshold)
        When data file is this size or greater, in bytes, a Pix Interchange Format 'x' record will be created and used for the file entry.

        Limitation At this time, PAX is only implemented for entries added as Files, not entries added as Stream.

      • queueEntry

        public void queueEntry(java.lang.String entryPath,
                               java.io.InputStream inStream,
                               int maxBytes)
                        throws java.io.IOException,
                               TarMalformatException
        This method does not support Pax Interchange Format, nor data sizes greater than 2G.

        This limitation may or may not be eliminated in the future.

        Throws:
        java.io.IOException
        TarMalformatException

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.