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

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


        // stream
        in.reset();
      }
    }

    in = new CBZip2InputStream(in);
    return in;
  }
View Full Code Here


        // stream
        in.reset();
      }
    }

    in = new CBZip2InputStream(new BufferedInputStream(in));
    return in;
  }
View Full Code Here

  public static final String VERSION = "$Header$";

  protected void process(String exepath, String[] args) throws Exception {
    BufferObjectWriter out = new BufferObjectWriter(getStdOut());
    BufferInputStream in = getStdInStream();
    CBZip2InputStream bin = new CBZip2InputStream(in);
    ObjectInputStream oin = new ObjectInputStream(bin);
    Object obj;
    try {
      boolean eof = false;
      while( !eof ) {
        try {
          obj = oin.readObject();
          out.writeObject(obj);
        } catch (java.io.OptionalDataException ode) {
          if(ode.eof) {
            eof = true;
            oin.close();
            bin.close();
            in.close();
          } else {
            throw ode;
          }
        }
View Full Code Here

    ((StandardFileSystemManager)VFS.getManager()).addProvider("tar", new TarFileProvider());
    ((StandardFileSystemManager)VFS.getManager()).addProvider("tgz", new TgzFileProvider());
    ((StandardFileSystemManager)VFS.getManager()).addProvider("tbz2", new Tbz2FileProvider());
    ((StandardFileSystemManager)VFS.getManager()).addProvider("gz", new GzipFileProvider());
    ((StandardFileSystemManager)VFS.getManager()).addProvider("tmp", new TemporaryFileProvider());
    ((StandardFileSystemManager)VFS.getManager()).addProvider(new String[] { "bzip2", "bz2" }, new Bzip2FileProvider());
   
    mgr.registerProvider(new FileProvider());
    mgr.registerProvider(new FTPProvider());
    mgr.registerProvider(new CIFSProvider());
    mgr.registerProvider(new JarProvider());
View Full Code Here

    public BZip2CompressionInputStream(InputStream in) throws IOException {

      super(in);
      BufferedInputStream bufferedIn = readStreamHeader();
      input = new CBZip2InputStream(bufferedIn);
    }
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

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.