Examples of CBZip2OutputStream


Examples of at.molindo.thirdparty.org.apache.tools.bzip2.CBZip2OutputStream

    return in;
  }

  private static OutputStream newBz2OutputStream(OutputStream out) throws IOException {
    // TODO linux compatibility?
    return new CBZip2OutputStream(out);
  }
View Full Code Here

Examples of org.apache.commons.compress.bzip2.CBZip2OutputStream

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

  protected void process(String exepath, String[] args) throws Exception {
    BufferObjectReader in = new BufferObjectReader(getStdIn());
    BufferOutputStream out = getStdOutStream();
    CBZip2OutputStream bout = new CBZip2OutputStream(out);
    ObjectOutputStream oout = new ObjectOutputStream(bout);
    Object obj;
    try {
      while( !in.isFinished() ) {
        obj = in.readObject();
        oout.writeObject(obj);
        oout.flush();
        bout.flush();
        out.flush();
      }
      in.close();
    } catch (Exception e) {
      if(canThrowEx()) {
        throw e;
      } else {
        org.jboss.fresh.io.BufferWriter bw = new BufferWriter(getStdOut());
        PrintWriter tOut = new PrintWriter(bw);
        tOut.write(e.toString());
      }
    }
    oout.close();
    bout.close();
    out.close();
  }
View Full Code Here

Examples of org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream

    public BZip2CompressionOutputStream(OutputStream out)
        throws IOException {
      super(out);
      writeStreamHeader();
      this.output = new CBZip2OutputStream(out);
    }
View Full Code Here

Examples of org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        writeStreamHeader();
        this.output = new CBZip2OutputStream(out);
      }
    }   
View Full Code Here

Examples of org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        writeStreamHeader();
        this.output = new CBZip2OutputStream(out);
      }
    }   
View Full Code Here

Examples of org.apache.hadoop.io.compress.bzip2.CBZip2OutputStream

    private void internalReset() throws IOException {
      if (needsReset) {
        needsReset = false;
        writeStreamHeader();
        this.output = new CBZip2OutputStream(out);
      }
    }   
View Full Code Here

Examples of org.apache.tools.bzip2.CBZip2OutputStream

                    outStr = new GZIPOutputStream(outStr);
                    break;
                case BZIP2:
                    outStr.write('B');
                    outStr.write('Z');
                    outStr = new CBZip2OutputStream(outStr);
                    break;
            }
            tarOutStr = new TarOutputStream(outStr);
            tarOutStr.setLongFileMode(TarOutputStream.LONGFILE_GNU);
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.tools.bzip2.CBZip2OutputStream

    {
        OutputStream os = getContainer().getContent().getOutputStream(false);
        os.write('B');
        os.write('Z');

        return new CBZip2OutputStream(os);
    }
View Full Code Here

Examples of org.apache.tools.bzip2.CBZip2OutputStream

                return new GZIPOutputStream(ostream);
            } else {
                if (BZIP2.equals(v)) {
                    ostream.write('B');
                    ostream.write('Z');
                    return new CBZip2OutputStream(ostream);
                }
            }
            return ostream;
        }
View Full Code Here

Examples of org.apache.tools.bzip2.CBZip2OutputStream

* @ant.task category="packaging"
*/

public class BZip2 extends Pack {
    protected void pack() {
        CBZip2OutputStream zOut = null;
        try {
            BufferedOutputStream bos =
                new BufferedOutputStream(new FileOutputStream(zipFile));
            bos.write('B');
            bos.write('Z');
            zOut = new CBZip2OutputStream(bos);
            zipFile(source, zOut);
        } catch (IOException ioe) {
            String msg = "Problem creating bzip2 " + ioe.getMessage();
            throw new BuildException(msg, ioe, location);
        } finally {
            if (zOut != null) {
                try {
                    // close up
                    zOut.close();
                } catch (IOException e) {}
            }
        }
    }
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.