org.xwiki.xar
Class XarPackage

java.lang.Object
  extended by org.xwiki.xar.XarPackage

@Unstable
public class XarPackage
extends Object

Manipulate package.xml XAR package file.

Since:
5.4RC1
Version:
$Id: 6871142c09753533849475f3dacfa3c56e2bf099 $

Constructor Summary
XarPackage()
           
XarPackage(Collection<XarEntry> entries)
           
XarPackage(File file)
           
XarPackage(InputStream xarStream)
           
XarPackage(org.apache.commons.compress.archivers.zip.ZipFile zipFile)
           
 
Method Summary
 void addEntry(LocalDocumentReference reference)
           
 Collection<XarEntry> getEntries()
           
static Collection<XarEntry> getEntries(File file)
           
 XarEntry getEntry(LocalDocumentReference reference)
           
 String getPackageAuthor()
           
 String getPackageDescription()
           
 String getPackageExtensionId()
           
 String getPackageLicense()
           
 String getPackageName()
           
 String getPackageVersion()
           
 boolean isPackageBackupPack()
           
 boolean isPackagePreserveVersion()
           
 void read(InputStream xarStream)
           
 void read(org.apache.commons.compress.archivers.zip.ZipFile zipFile)
           
 void readDescriptor(InputStream stream)
           
 void setPackageAuthor(String packageAuthor)
           
 void setPackageBackupPack(boolean packageBackupPack)
           
 void setPackageDescription(String packageDescription)
           
 void setPackageExtensionId(String packageExtensionId)
           
 void setPackageLicense(String packageLicense)
           
 void setPackageName(String packageName)
           
 void setPackageVersion(String packageVersion)
           
 void setPreserveVersion(boolean preserveVersion)
           
 void write(OutputStream stream, String encoding)
           
 void write(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zipStream, String encoding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XarPackage

public XarPackage()

XarPackage

public XarPackage(org.apache.commons.compress.archivers.zip.ZipFile zipFile)
           throws XarException,
                  IOException
Throws:
XarException
IOException

XarPackage

public XarPackage(File file)
           throws IOException,
                  XarException
Throws:
IOException
XarException

XarPackage

public XarPackage(InputStream xarStream)
           throws IOException,
                  XarException
Throws:
IOException
XarException

XarPackage

public XarPackage(Collection<XarEntry> entries)
Method Detail

read

public void read(InputStream xarStream)
          throws IOException,
                 XarException
Throws:
IOException
XarException

read

public void read(org.apache.commons.compress.archivers.zip.ZipFile zipFile)
          throws IOException,
                 XarException
Throws:
IOException
XarException

getPackageExtensionId

public String getPackageExtensionId()

setPackageExtensionId

public void setPackageExtensionId(String packageExtensionId)

isPackagePreserveVersion

public boolean isPackagePreserveVersion()

setPreserveVersion

public void setPreserveVersion(boolean preserveVersion)

getPackageName

public String getPackageName()

setPackageName

public void setPackageName(String packageName)

getPackageDescription

public String getPackageDescription()

setPackageDescription

public void setPackageDescription(String packageDescription)

getPackageLicense

public String getPackageLicense()

setPackageLicense

public void setPackageLicense(String packageLicense)

getPackageAuthor

public String getPackageAuthor()

setPackageAuthor

public void setPackageAuthor(String packageAuthor)

getPackageVersion

public String getPackageVersion()

setPackageVersion

public void setPackageVersion(String packageVersion)

isPackageBackupPack

public boolean isPackageBackupPack()

setPackageBackupPack

public void setPackageBackupPack(boolean packageBackupPack)

addEntry

public void addEntry(LocalDocumentReference reference)

getEntries

public Collection<XarEntry> getEntries()

getEntries

public static Collection<XarEntry> getEntries(File file)
                                       throws XarException,
                                              IOException
Throws:
XarException
IOException

getEntry

public XarEntry getEntry(LocalDocumentReference reference)

readDescriptor

public void readDescriptor(InputStream stream)
                    throws XarException,
                           IOException
Throws:
XarException
IOException

write

public void write(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream zipStream,
                  String encoding)
           throws XarException,
                  IOException
Throws:
XarException
IOException

write

public void write(OutputStream stream,
                  String encoding)
           throws XarException,
                  IOException
Throws:
XarException
IOException


Copyright © 2004–2014 XWiki. All rights reserved.