Examples of DumpArchiveInputStream


Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

     */
    public ArchiveInputStream getArchiveStream(InputStream stream,
                                               String encoding)
        throws IOException {
        try {
            return new DumpArchiveInputStream(stream);
        } catch (ArchiveException ex) {
            throw new BuildException(ex);
        }
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

                return new CpioArchiveInputStream(in);
            }
        }
        if (DUMP.equalsIgnoreCase(archiverName)) {
            if (entryEncoding != null) {
                return new DumpArchiveInputStream(in, entryEncoding);
            } else {
                return new DumpArchiveInputStream(in);
            }
        }

        throw new ArchiveException("Archiver: " + archiverName + " not found.");
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

            final byte[] dumpsig = new byte[32];
            in.mark(dumpsig.length);
            signatureLength = IOUtils.readFully(in, dumpsig);
            in.reset();
            if (DumpArchiveInputStream.matches(dumpsig, signatureLength)) {
                return new DumpArchiveInputStream(in);
            }

            // Tar needs an even bigger buffer to check the signature; read the first block
            final byte[] tarheader = new byte[512];
            in.mark(tarheader.length);
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

                return new CpioArchiveInputStream(in);
            }
        }
        if (DUMP.equalsIgnoreCase(archiverName)) {
            if (entryEncoding != null) {
                return new DumpArchiveInputStream(in, entryEncoding);
            } else {
                return new DumpArchiveInputStream(in);
            }
        }
        if (SEVEN_Z.equalsIgnoreCase(archiverName)) {
            throw new StreamingNotSupportedException(SEVEN_Z);
        }
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

            final byte[] dumpsig = new byte[32];
            in.mark(dumpsig.length);
            signatureLength = IOUtils.readFully(in, dumpsig);
            in.reset();
            if (DumpArchiveInputStream.matches(dumpsig, signatureLength)) {
                return new DumpArchiveInputStream(in);
            }

            // Tar needs an even bigger buffer to check the signature; read the first block
            final byte[] tarheader = new byte[512];
            in.mark(tarheader.length);
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

        }
        if (CPIO.equalsIgnoreCase(archiverName)) {
            return new CpioArchiveInputStream(in);
        }
        if (DUMP.equalsIgnoreCase(archiverName)) {
            return new DumpArchiveInputStream(in);
        }

        throw new ArchiveException("Archiver: " + archiverName + " not found.");
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

            final byte[] dumpsig = new byte[32];
            in.mark(dumpsig.length);
            signatureLength = in.read(dumpsig);
            in.reset();
            if (DumpArchiveInputStream.matches(dumpsig, signatureLength)) {
                return new DumpArchiveInputStream(in);
            }

            // Tar needs an even bigger buffer to check the signature; read the first block
            final byte[] tarheader = new byte[512];
            in.mark(tarheader.length);
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

        }
        if (CPIO.equalsIgnoreCase(archiverName)) {
            return new CpioArchiveInputStream(in);
        }
        if (DUMP.equalsIgnoreCase(archiverName)) {
            return new DumpArchiveInputStream(in);
        }
       
        throw new ArchiveException("Archiver: " + archiverName + " not found.");
    }
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

            final byte[] dumpsig = new byte[32];
            in.mark(dumpsig.length);
            signatureLength = in.read(dumpsig);
            in.reset();
            if (DumpArchiveInputStream.matches(dumpsig, signatureLength)) {
                return new DumpArchiveInputStream(in);
            }

            // Tar needs an even bigger buffer to check the signature; read the first block
            final byte[] tarheader = new byte[512];
            in.mark(tarheader.length);
View Full Code Here

Examples of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

                return new CpioArchiveInputStream(in);
            }
        }
        if (DUMP.equalsIgnoreCase(archiverName)) {
            if (entryEncoding != null) {
                return new DumpArchiveInputStream(in, entryEncoding);
            } else {
                return new DumpArchiveInputStream(in);
            }
        }

        throw new ArchiveException("Archiver: " + archiverName + " not found.");
    }
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.