com.businessobjects.sdk.biar
Class Archive

java.lang.Object
  extended by com.businessobjects.sdk.biar.Archive

public class Archive
extends java.lang.Object

The Archive represents an exported BIAR archive on the disk and provides access to meta-information about the archive.


Constructor Summary
Archive(java.lang.String fileName)
          Constructs an Archive object and creates the archive file with the specified filename.
 
Method Summary
 java.lang.String getAppID()
          Returns a unique ID for the application that generated the archive.
 java.lang.String getAppName()
          Returns the name of the application that generated the archive.
 java.util.Properties getMetaInfo()
          Returns a set of properties containing additional meta-information about the archive.
 java.util.List getSegmentList()
          Returns the list of segments that were created for this archive.
 int getVersion()
          Returns the version number of the SDK that was used to create the archive.
 boolean isEncrypted()
          Returns true if the Archive is encrypted.
 boolean verifyPassword(java.lang.String password)
          Checks whether the specified password can decrypt the BIAR file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Archive

public Archive(java.lang.String fileName)
        throws BIARException
Constructs an Archive object and creates the archive file with the specified filename.

Parameters:
fileName - the path to the BIAR file
Throws:
BIARException - if the archive does not exist or cannot be opened.
Method Detail

getSegmentList

public java.util.List getSegmentList()
Returns the list of segments that were created for this archive. During export, an archive may be split into multiple segments. Each segment is stored in a separate file. This method returns a collection containing the names of the files were created. The names are relative to the path specified in the call to the Archive constructor.

Returns:
a list containing the names of the segments created for this archive.

getMetaInfo

public java.util.Properties getMetaInfo()
Returns a set of properties containing additional meta-information about the archive.

Returns:
the archive meta-info.

getAppID

public java.lang.String getAppID()
Returns a unique ID for the application that generated the archive.

Returns:
the application ID, or null if unknown.

getAppName

public java.lang.String getAppName()
Returns the name of the application that generated the archive.

Returns:
the application name, or null if unknown.

getVersion

public int getVersion()
Returns the version number of the SDK that was used to create the archive.

Returns:
The version number.

isEncrypted

public boolean isEncrypted()
Returns true if the Archive is encrypted. In which case a password is required to extract its contents

Returns:
True if the Archive is encrypted, false otherwise.

verifyPassword

public boolean verifyPassword(java.lang.String password)
                       throws java.io.IOException
Checks whether the specified password can decrypt the BIAR file.

Returns:
Returns true if the password is correct or if the BIAR is not encrypted. False otherwise.
Throws:
java.io.IOException - Thrown if the password can't be parsed into a byte array correctly.