Package org.apache.commons.compress.archivers.tar

Examples of org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry()


                    schemaFile = createSchemaXML(getLDPathProgram(ldPathProgram), IOUtils.toByteArray(zis));
                    TarArchiveEntry te = new TarArchiveEntry(coreName + SOLR_SCHEMA);
                    te.setSize(schemaFile.length);
                    tarOutputStream.putArchiveEntry(te);
                    tarOutputStream.write(schemaFile);
                    tarOutputStream.closeArchiveEntry();
                } else {
                    TarArchiveEntry te = new TarArchiveEntry(ze.getName().replaceAll(SOLR_TEMPLATE_NAME,
                        coreName));
                    te.setSize(ze.getSize());
                    tarOutputStream.putArchiveEntry(te);
View Full Code Here


                    TarArchiveEntry te = new TarArchiveEntry(ze.getName().replaceAll(SOLR_TEMPLATE_NAME,
                        coreName));
                    te.setSize(ze.getSize());
                    tarOutputStream.putArchiveEntry(te);
                    tarOutputStream.write(IOUtils.toByteArray(zis));
                    tarOutputStream.closeArchiveEntry();
                }

            }
            if (schemaFile == null) {
                throw new LDPathException("Schema template ZIP should include: " + SOLR_TEMPLATE_SCHEMA);
View Full Code Here

                Utils.copy(inputStream, new DigestOutputStream(tarOutputStream, digest));

                final String md5 = Utils.toHex(digest.digest());

                tarOutputStream.closeArchiveEntry();

                console.debug(
                    "file:" + entry.getName() +
                        " size:" + entry.getSize() +
                        " mode:" + entry.getMode() +
View Full Code Here

                entry.setGroupName(group);
                entry.setGroupId(gid);
                entry.setMode(mode);

                tarOutputStream.putArchiveEntry(entry);
                tarOutputStream.closeArchiveEntry();

                console.debug(
                    "link:" + entry.getName() +
                    " mode:" + entry.getMode() +
                    " linkname:" + entry.getLinkName() +
View Full Code Here

                    entry.setGroupId(gid);
                    entry.setMode(mode);
                    entry.setSize(size);
       
                    tarOutputStream.putArchiveEntry(entry);
                    tarOutputStream.closeArchiveEntry();
                    addedDirectories.add(directory); // so addedDirectories consistently have "/" for finding duplicates.
                }
            }
       
            private void createParentDirectories( String filename, String user, int uid, String group, int gid ) throws IOException {
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.