org.freehep.util.io
Class ASCIIHexOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.freehep.util.io.ASCIIHexOutputStream
- All Implemented Interfaces:
- Closeable, Flushable, FinishableOutputStream
public class ASCIIHexOutputStream
- extends FilterOutputStream
- implements FinishableOutputStream
The ASCIIHexOutputStream encodes binary data as ASCII Hexadecimal. The exact
definition of ASCII Hex encoding can be found in the PostScript Language
Reference (3rd ed.) chapter 3.13.3.
- Version:
- $Id: ASCIIHexOutputStream.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
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 b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASCIIHexOutputStream
public ASCIIHexOutputStream(OutputStream out)
- Create an ASCIIHex Output Stream for given stream.
- Parameters:
out
- output stream to use
write
public void write(int b)
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.