Package org.apache.commons.vfs.provider.bzip2

Examples of org.apache.commons.vfs.provider.bzip2.CBZip2InputStream


        is = fs.open(dfsPath);
        String name = dfsPath.getName().toLowerCase();
        if (name.endsWith(".gz")) {
            is = new GZIPInputStream(is);
        } else if (name.endsWith(".bz") || name.endsWith(".bz2")) {
            is = new CBZip2InputStream(is);
        }

        /*
        File out = File.createTempFile("packetpig", "stream");

View Full Code Here


            path = p.toString();

            if (path.endsWith(".gz")) {
                is = new PcapFSDataInputStream(new GZIPInputStream(fsdis), fs.getLength(p));
            } else if (path.endsWith(".bz") || path.endsWith(".bz2")) {
                is = new PcapFSDataInputStream(new CBZip2InputStream(fsdis), fs.getLength(p));
            } else {
                is = new PcapFSDataInputStream(fsdis, fs.getLength(p));
            }
        }
    }
View Full Code Here

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        BufferedInputStream bufferedIn = readStreamHeader();
        input = new CBZip2InputStream(bufferedIn);
      }
    }   
View Full Code Here

      this.readMode = readMode;
      if (this.startingPos == 0) {
        // We only strip header if it is start of file
        bufferedIn = readStreamHeader();
      }
      input = new CBZip2InputStream(bufferedIn, readMode);
      if (this.isHeaderStripped) {
        input.updateReportedByteCount(HEADER_LEN);
      }

      if (this.isSubHeaderStripped) {
View Full Code Here

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        BufferedInputStream bufferedIn = readStreamHeader();
        input = new CBZip2InputStream(bufferedIn, this.readMode);
      }
    }   
View Full Code Here

      this.readMode = readMode;
      if (this.startingPos == 0) {
        // We only strip header if it is start of file
        bufferedIn = readStreamHeader();
      }
      input = new CBZip2InputStream(bufferedIn, readMode);
      if (this.isHeaderStripped) {
        input.updateReportedByteCount(HEADER_LEN);
      }

      if (this.isSubHeaderStripped) {
View Full Code Here

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        BufferedInputStream bufferedIn = readStreamHeader();
        input = new CBZip2InputStream(bufferedIn, this.readMode);
      }
    }   
View Full Code Here

      this.readMode = readMode;
      if (this.startingPos == 0) {
        // We only strip header if it is start of file
        bufferedIn = readStreamHeader();
      }
      input = new CBZip2InputStream(bufferedIn, readMode);
      if (this.isHeaderStripped) {
        input.updateReportedByteCount(HEADER_LEN);
      }

      if (this.isSubHeaderStripped) {
View Full Code Here

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        BufferedInputStream bufferedIn = readStreamHeader();
        input = new CBZip2InputStream(bufferedIn, this.readMode);
      }
    }   
View Full Code Here

        else if(lowerName.endsWith(".tar.bz") || lowerName.endsWith(".tar.bz2") || lowerName.endsWith(".tbz"))
        {
          FileInputStream is = new FileInputStream(archive);
          is.read(); // read 'B'
          is.read(); // read 'Z'
          archiveInputStream = new ArchiveStreamFactory().createArchiveInputStream("tar", new CBZip2InputStream(is));
        }
        else if(lowerName.endsWith(".tar"))
        {
          archiveInputStream = new ArchiveStreamFactory().createArchiveInputStream("tar", new FileInputStream(archive));
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.provider.bzip2.CBZip2InputStream

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.