Package org.cip4.lib.xjdf.xml.internal
Class AbstractXmlUnpackager
java.lang.Object
org.cip4.lib.xjdf.xml.internal.AbstractXmlUnpackager
- Direct Known Subclasses:
XJdfUnpackager
Unpackaging logic for packages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]extractFile(String relativePath) Extracts a file from Package.protected byte[]Find the master document in package file.protected StringFind the master document path in package file.protected abstract String[]Defines the file extension of the master file.protected StringunpackageZip(String targetDir) Unpackages a ZIP Package.protected StringUnpackages a ZIP Package to a temporarily directory..protected StringunpackageZipTemp(String appName) Unpackages a ZIP Package to a temporarily directory.
-
Constructor Details
-
AbstractXmlUnpackager
Custom constructor. Accepting a package path for initializing.- Parameters:
pathPackage- Path of the package.- Throws:
IOException- Is thrown in case an IOExcetion occurs.
-
-
Method Details
-
unpackageZipTemp
Unpackages a ZIP Package to a temporarily directory..- Returns:
- Path to master file.
- Throws:
IOException
-
unpackageZipTemp
Unpackages a ZIP Package to a temporarily directory.- Parameters:
appName- Application name.- Returns:
- Path to master file.
- Throws:
IOException
-
unpackageZip
Unpackages a ZIP Package.- Parameters:
targetDir- Target destionation.- Returns:
- Path to master file.
- Throws:
IOException
-
findMasterDocumentPath
Find the master document path in package file.- Returns:
- The master document as byte array.
-
findMasterDocument
Find the master document in package file.- Returns:
- The master document as byte array.
- Throws:
IOException- Is thrown in case an IOExcetion occurs.
-
extractFile
Extracts a file from Package.- Parameters:
relativePath- The relative path of the file which should be extracted.- Returns:
- File as byte array.
- Throws:
IOException
-
getMasterExtension
Defines the file extension of the master file.- Returns:
- Array of master file extensions.
-