Package com.sun.corba.ee.impl.misc
Class HexOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.sun.corba.ee.impl.misc.HexOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class HexOutputStream extends java.io.OutputStream
Writes each input byte as a 2 byte hexidecimal output pair making it possible to turn arbitrary binary data into an ASCII format. The high 4 bits of the byte is translated into the first byte.
-
-
Constructor Summary
Constructors Constructor Description HexOutputStream(java.io.StringWriter w)
Creates a new HexOutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
Writes a byte.
-
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
Writes a byte. Will block until the byte is actually written. param b The byte to write out.- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
- I/O error occurred.
-
write
public void write(byte[] b) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
-