Examples of copyEntryContents()


Examples of com.ice.tar.TarInputStream.copyEntryContents()

      else
      {

        FileOutputStream fout = new FileOutputStream(destPath);

        tin.copyEntryContents(fout);

        fout.close();
      }
      tarEntry = tin.getNextEntry();
    }
View Full Code Here

Examples of com.ice.tar.TarInputStream.copyEntryContents()

        File destPath = new File( outputDirectory + File.separator + tarEntry.getName() );
        System.out.println( "Processing " + destPath.getAbsoluteFile() );
        if( !tarEntry.isDirectory() )
        {
          FileOutputStream fout = new FileOutputStream( destPath );
          tin.copyEntryContents( fout );
          fout.close();
        }
        else
        {
          destPath.mkdirs();
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

      while(tarEntry != null){
        final File destPath = new File(untarDir + File.separator + tarEntry.getName());
        if (!tarEntry.isDirectory()) {
          new File(destPath.getParent()).mkdirs(); // create missing subdirectories
          final FileOutputStream fout = new FileOutputStream(destPath);
          tin.copyEntryContents(fout);
          fout.close();
        } else {
          destPath.mkdir();
        }
        tarEntry = tin.getNextEntry();
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

                }
            }
            if ((out = openFileWrite(file, true, true)) == null) {
                continue;
            }
            tin.copyEntryContents(out);
            out.close();
        }
        tin.close();
    }
   
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

            if (tarEntry.isDirectory()) {
                destEntry.mkdirs();
            } else {
                FileOutputStream fout = new FileOutputStream(destEntry);
                try {
                    tin.copyEntryContents(fout);
                } finally {
                    fout.close();
                }
            }
        }
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

    TarEntry tarEntry = tin.getNextEntry();
    while (tarEntry != null) {
      if (!tarEntry.isDirectory()) {
        // tar.getName()
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        tin.copyEntryContents(os);
        os.close();
        contents.put(tarEntry.getName(), os.toByteArray());
      }
      tarEntry = tin.getNextEntry();
    }
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

    TarEntry tarEntry = tin.getNextEntry();
    while (tarEntry != null) {
      if (!tarEntry.isDirectory()) {
        // tar.getName()
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        tin.copyEntryContents(os);
        os.close();
        contents.put(tarEntry.getName(), os.toByteArray());
      }
      tarEntry = tin.getNextEntry();
    }
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

          } else {
            File f = new File(targetDirectory,e.getName());
            if( ! f.getParentFile().exists() ) {
              f.getParentFile().mkdirs();
            }
            in.copyEntryContents(new FileOutputStream(f));
           
            int m = e.getMode();
            if( (m & OWNER_EXEC) == OWNER_EXEC
                || (m & GROUP_EXEC) == GROUP_EXEC
                || (m & OTHER_EXEC) == OTHER_EXEC ) {
View Full Code Here

Examples of org.apache.tools.tar.TarInputStream.copyEntryContents()

      while(tarEntry != null){
        final File destPath = new File(untarDir + File.separator + tarEntry.getName());
        if (!tarEntry.isDirectory()) {
          new File(destPath.getParent()).mkdirs(); // create missing subdirectories
          final FileOutputStream fout = new FileOutputStream(destPath);
          tin.copyEntryContents(fout);
          fout.close();
        } else {
          destPath.mkdir();
        }
        tarEntry = tin.getNextEntry();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.