org.freehep.util.io
Class ASCII85OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.freehep.util.io.ASCII85OutputStream
All Implemented Interfaces:
Closeable, Flushable, ASCII85, FinishableOutputStream

public class ASCII85OutputStream
extends FilterOutputStream
implements ASCII85, FinishableOutputStream

The ASCII85InputStream encodes binary data as ASCII base-85 encoding. The exact definition of ASCII base-85 encoding can be found in the PostScript Language Reference (3rd ed.) chapter 3.13.3.

Version:
$Id: ASCII85OutputStream.java 10259 2007-01-05 22:52:09Z duns $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Fields inherited from interface org.freehep.util.io.ASCII85
a85p1, a85p2, a85p3, a85p4, MAX_CHARS_PER_LINE
 
Constructor Summary
ASCII85OutputStream(OutputStream out)
          Create an ASCII85 Output Stream from given stream
 
Method Summary
 void close()
           
 void finish()
          Finishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.
 void write(int a)
           
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASCII85OutputStream

public ASCII85OutputStream(OutputStream out)
Create an ASCII85 Output Stream from given stream

Parameters:
out - output stream to use
Method Detail

write

public void write(int a)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

finish

public void finish()
            throws IOException
Description copied from interface: FinishableOutputStream
Finishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.

Specified by:
finish in interface FinishableOutputStream
Throws:
IOException - if write fails

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException


Copyright © 2000-2007 FreeHEP. All Rights Reserved.