Package org.xeustechnologies.jtar

Examples of org.xeustechnologies.jtar.TarEntry


            // Files to tar
            for (File f : content) {

                try {
                    out.putNextEntry(new TarEntry(f, f.getName()));
                    BufferedInputStream origin = new BufferedInputStream(new FileInputStream(f));

                    int count;
                    byte data[] = new byte[2048];
                    while ((count = origin.read(data)) != -1) {
View Full Code Here


    public void doDecompression(String tarFile,String destFolder) {
        TarInputStream tis = null;
        try {
            tis = new TarInputStream(new BufferedInputStream(new FileInputStream(tarFile)));
            TarEntry entry;
            try {
                while ((entry = tis.getNextEntry()) != null) {
                    int count;
                    byte data[] = new byte[2048];
                   
                    FileOutputStream fos = new FileOutputStream(destFolder + "/" + entry.getName());
                    BufferedOutputStream dest = new BufferedOutputStream(fos);
                   
                    while ((count = tis.read(data)) != -1) {
                        dest.write(data, 0, count);
                    }
View Full Code Here

TOP

Related Classes of org.xeustechnologies.jtar.TarEntry

Copyright © 2018 www.massapicom. 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.