org.bolson
Class HexOutputStream
java.lang.Object
java.io.OutputStream
org.bolson.HexOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class HexOutputStream
- extends java.io.OutputStream
Method Summary |
static boolean |
eq(byte[] a,
byte[] b)
|
void |
flush()
|
static java.lang.String |
hexString(byte[] data)
|
static java.lang.String |
hexStringB(byte[] data)
hexString with Breaks, '_' and ' ' |
static void |
print(java.io.PrintWriter out,
byte[] data,
int length,
int addr)
|
void |
setAddress(long address)
|
void |
setWidth(int width)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
close, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HexOutputStream
public HexOutputStream(java.io.OutputStream out)
HexOutputStream
public HexOutputStream(java.io.OutputStream out,
int width)
HexOutputStream
public HexOutputStream(java.io.Writer out)
HexOutputStream
public HexOutputStream(java.io.Writer out,
int width)
setAddress
public void setAddress(long address)
setWidth
public void setWidth(int width)
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.OutputStream
- Throws:
java.io.IOException
eq
public static boolean eq(byte[] a,
byte[] b)
hexString
public static java.lang.String hexString(byte[] data)
hexStringB
public static java.lang.String hexStringB(byte[] data)
- hexString with Breaks, '_' and ' '
print
public static void print(java.io.PrintWriter out,
byte[] data,
int length,
int addr)