com.sun.enterprise.util.zip.ZipFile.explode()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中com.sun.enterprise.util.zip.ZipFile.explode()方法的一些代码示例,展示了ZipFile.explode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFile.explode()方法的具体详情如下:
包路径:com.sun.enterprise.util.zip.ZipFile
类名称:ZipFile
方法名:explode

ZipFile.explode介绍

[英]Explodes files as usual, and then explodes every jar file found. All explosions are copied relative the same root directory.

It does a case-sensitive check for files that end with ".jar" will comment out for later possbile use public ArrayList explodeAll() throws ZipFileException { return doExplode(this); }
[中]像往常一样分解文件,然后分解找到的每个jar文件。所有爆炸都是相对于同一根目录复制的。
它会对以“.jar”结尾的文件进行区分大小写的检查,稍后可能会使用公共ArrayList Explodall()抛出ZipFileException{return doExplode(this);}

代码示例

代码示例来源:origin: org.glassfish.common/common-util

/**
* @param args the command line arguments
*/
public static void main (String args[]) 
{
  try
  {
    ZipFile zip = new ZipFile("C:\\temp\\petstore.ear", "C:\\temp\\petstore");
    java.util.List l = zip.explode();
    System.out.println("**** Filelist ****\n" + l);
  }
  catch(Exception e)
  {
    System.out.println("error: " + e);
    e.printStackTrace();
  }
}

代码示例来源:origin: org.glassfish.main.common/common-util

/**
* @param args the command line arguments
*/
public static void main (String args[]) 
{
  try
  {
    ZipFile zip = new ZipFile("C:\\temp\\petstore.ear", "C:\\temp\\petstore");
    java.util.List l = zip.explode();
    System.out.println("**** Filelist ****\n" + l);
  }
  catch(Exception e)
  {
    System.out.println("error: " + e);
    e.printStackTrace();
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

/**
* @param args the command line arguments
*/
public static void main (String args[]) 
{
  try
  {
    ZipFile zip = new ZipFile("C:\\temp\\petstore.ear", "C:\\temp\\petstore");
    java.util.List l = zip.explode();
    System.out.println("**** Filelist ****\n" + l);
  }
  catch(Exception e)
  {
    System.out.println("error: " + e);
    e.printStackTrace();
  }
}

代码示例来源:origin: org.glassfish.common/common-util

tmpList = tmpZf.explode();

代码示例来源:origin: org.glassfish.deployment/deployment-common

zip.explode();
} catch(ZipFileException e) {
  IOException ioe = new IOException(e.getMessage());

代码示例来源:origin: org.glassfish.main.admin/server-mgmt

/**
 * This method is used to create Java EESE install root
 *
 * @param layout PEFileLayout
 */
public void createJavaEESEInstallRoot(PEFileLayout layout)
    throws Exception {
  FileUtils.copy(
      layout.getJavaEESEArchiveSource(),
      layout.getJavaEESEArchiveDestination());
  ZipFile zf = new ZipFile(layout.getJavaEESEArchiveSource(), layout.getJavaEESEInstallRoot());
  zf.explode();
}

代码示例来源:origin: org.glassfish.main.admin/server-mgmt

/**
 * This method is used to create httpsoapbc install root
 *
 * @param layout PEFileLayout
 */
public void createHttpBCInstallRoot(PEFileLayout layout)
    throws Exception {
  FileUtils.copy(
      layout.getHttpBcArchiveSource(),
      layout.getHttpBcArchiveDestination());
  ZipFile zf = new ZipFile(layout.getHttpBcArchiveSource(), layout.getHttpBcInstallRoot());
  zf.explode();
}

代码示例来源:origin: org.glassfish.main.admin/server-mgmt

/**
 * This method is used to create WSDLSL install root
 *
 * @param layout PEFileLayout
 */
public void createWSDLSLInstallRoot(PEFileLayout layout)
    throws Exception {
  FileUtils.copy(
      layout.getWSDLSLArchiveSource(),
      layout.getWSDLSLArchiveDestination());
  ZipFile zf = new ZipFile(layout.getWSDLSLArchiveSource(), layout.getWSDLSLInstallRoot());
  zf.explode();
}

代码示例来源:origin: org.glassfish.main.admin/backup

public String restore() throws BackupException {
  try {
    boolean isConfigBackup = isAConfigBackup();
    checkDomainName();
    ZipFile zf = new ZipFile(request.backupFile, tempRestoreDir);
    zf.explode();
    sanityCheckExplodedFiles();
    // If we are restoring the whole domain then we need to preserve
    // the backups directory.
    if (!isConfigBackup)
      copyBackups();
    atomicSwap(request.domainDir, request.domainName, isConfigBackup);
    setPermissions();
    String mesg = readAndDeletePropsFile(isConfigBackup);
    return mesg;
  }
  catch(BackupException be) {
    throw be;
  }
  catch(Exception e) {
    throw new BackupException("Restore Error" + e.toString(), e);
  }
}

相关文章