public class BusinessArchiveFactory extends Object
BusinessArchive
from/to file systemConstructor and Description |
---|
BusinessArchiveFactory() |
Modifier and Type | Method and Description |
---|---|
static String |
businessArchiveFolderToFile(File destFile,
String folderPath)
Save the uncompressed business archive folder to a compressed file.
|
static BusinessArchive |
readBusinessArchive(File barOrFolder)
Create a business archive from a valid file or folder
|
static BusinessArchive |
readBusinessArchive(InputStream inputStream)
Create a business archive from an
InputStream |
static void |
writeBusinessArchiveToFile(BusinessArchive businessArchive,
File businessArchiveFile)
Write the
BusinessArchive to the .bar file given in parameter. |
static void |
writeBusinessArchiveToFolder(BusinessArchive businessArchive,
File folderPath)
Write the
BusinessArchive to the folder given in parameter |
public static BusinessArchive readBusinessArchive(InputStream inputStream) throws IOException, InvalidBusinessArchiveFormatException
InputStream
inputStream
- IOException
- in case of issue reading/writing on file systemInvalidBusinessArchiveFormatException
- if the inpu stream does not contains a valide business archivepublic static BusinessArchive readBusinessArchive(File barOrFolder) throws InvalidBusinessArchiveFormatException, IOException
barOrFolder
- the folder or file that contains the business archive to readIOException
- in case of issue reading/writing on file systemInvalidBusinessArchiveFormatException
- if the input stream does not contains a valid business archivepublic static void writeBusinessArchiveToFolder(BusinessArchive businessArchive, File folderPath) throws IOException
BusinessArchive
to the folder given in parameter
the written business archive the uncompressed version of writeBusinessArchiveToFile(BusinessArchive, File)
businessArchive
- the BusinessArchive
to writefolderPath
- the folder into the business archive must be writtenIOException
public static void writeBusinessArchiveToFile(BusinessArchive businessArchive, File businessArchiveFile) throws IOException
BusinessArchive
to the .bar file given in parameter.
this file can then be read using readBusinessArchive(File)
businessArchive
- the BusinessArchive
to writefolderPath
- the folder into the business archive must be writtenIOException
public static String businessArchiveFolderToFile(File destFile, String folderPath) throws IOException
this file can then be read using readBusinessArchive(File)
destFile
- folderPath
- IOException
Copyright © 2013 BonitaSoft. All Rights Reserved.