com.adobe.idml
Class Package

java.lang.Object
  extended by com.adobe.idml.Package

public class Package
extends java.lang.Object

Contains methods for working with IDML packages.


Constructor Summary
Package()
           
 
Method Summary
static void compress(java.io.File locationDir, java.lang.String fileName)
          The compress method builds an IDML compatible archive from all the files contained in directory provided.
static void compress(java.lang.String dirPath, java.lang.String fileName)
          The compress method builds an IDML compatible archive from all the files contained in directory provided.
static java.io.File decompress(java.io.File idmlSrc)
          Creates a temporary directory and decompresses the IDML file provided into that directory.
static void decompress(java.io.File idmlSrcFile, java.io.File idmlDestinationFile)
          The decompress method can be used to extract an IDML archive specified in the idmlSrcFile parameter to the directory specified in the idmlDestinationFile parameter.
static java.io.File decompress(java.lang.String idmlFilePath)
          Creates a temporary directory and decompresses the IDML file provided into that directory.
static void decompress(java.lang.String compressedFilePath, java.lang.String targetDirPath)
          The decompress method can be used to extract an IDML archive specified in the compressedFilePath parameter to the directory specified in the targetDirPath parameter.
static boolean isAPackage(java.lang.String filePath)
          Is this an IDML package.
static void main(java.lang.String[] args)
          Driver method for packaging and unpackaging.
static void verifyPackage(java.lang.String filePath)
          Throws an exception if the file is not an IDML package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Package

public Package()
Method Detail

isAPackage

public static boolean isAPackage(java.lang.String filePath)
Is this an IDML package.

Parameters:
filePath - A path to an IDML file that may or may not already exist.
Returns:
true if this appears to be an IDML file.

verifyPackage

public static void verifyPackage(java.lang.String filePath)
Throws an exception if the file is not an IDML package.

Parameters:
filePath - A path to the file requiring verification.

decompress

public static void decompress(java.lang.String compressedFilePath,
                              java.lang.String targetDirPath)
                       throws java.io.IOException
The decompress method can be used to extract an IDML archive specified in the compressedFilePath parameter to the directory specified in the targetDirPath parameter.

Parameters:
compressedFilePath - the IDML archive to decompress
targetDirPath - The directory to extract files to.
Throws:
java.io.IOException

decompress

public static void decompress(java.io.File idmlSrcFile,
                              java.io.File idmlDestinationFile)
                       throws java.io.IOException
The decompress method can be used to extract an IDML archive specified in the idmlSrcFile parameter to the directory specified in the idmlDestinationFile parameter.

Parameters:
idmlSrcFile - The source file.
idmlDestinationFile - The destination file.
Throws:
java.io.IOException

decompress

public static java.io.File decompress(java.lang.String idmlFilePath)
                               throws java.io.IOException
Creates a temporary directory and decompresses the IDML file provided into that directory.

Parameters:
idmlFilePath - The location of the IDML file to be decompressed.
Returns:
Returns the location of the temporary directory created.
Throws:
java.io.IOException

decompress

public static java.io.File decompress(java.io.File idmlSrc)
                               throws java.io.IOException
Creates a temporary directory and decompresses the IDML file provided into that directory.

Parameters:
idmlSrc - The location of the IDML file to be decompressed.
Returns:
Returns File object representing the location of the directory created.
Throws:
java.io.IOException

compress

public static void compress(java.lang.String dirPath,
                            java.lang.String fileName)
                     throws java.io.IOException
The compress method builds an IDML compatible archive from all the files contained in directory provided. This does not include the containing folder.

Parameters:
dirPath - A path to a folder containing the files to be compressed into an IDML archive
fileName - The name of the new IDML package file.
Throws:
java.io.IOException

compress

public static void compress(java.io.File locationDir,
                            java.lang.String fileName)
                     throws java.io.IOException
The compress method builds an IDML compatible archive from all the files contained in directory provided. This does not include the containing folder.

Parameters:
locationDir - A file object representing the directory containing files to be compressed into an IDML archive.
fileName - The name of the new IDML package file.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Driver method for packaging and unpackaging. Run with "-h" option for usage.

Parameters:
args -


Copyright © 2008 Adobe Systems Incorporated. All Rights Reserved.