java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream
edu.vt.middleware.crypt.io.HexFilterOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Encodes raw bytes into hexadecimal characters in the wrapped output stream.
- Version:
- $Revision: 2745 $
- Author:
- Middleware Services
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionCreates a hex filter output stream around the given output stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
writeEncoded
(byte[] data, int offset, int length) Encode the given raw bytes and write the result to the wrapped output stream.Methods inherited from class edu.vt.middleware.crypt.io.AbstractEncodingFilterOutputStream
write, write, write
Methods inherited from class java.io.FilterOutputStream
close, flush
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
HexFilterOutputStream
Creates a hex filter output stream around the given output stream.- Parameters:
out
- Output stream to wrap.
-
-
Method Details
-
writeEncoded
Encode the given raw bytes and write the result to the wrapped output stream.- Specified by:
writeEncoded
in classAbstractEncodingFilterOutputStream
- Parameters:
data
- Raw bytes to be encoded and written.offset
- Starting index of data to be written in input byte array.length
- Number of bytes to be written from input byte array.- Throws:
IOException
- On write errors.
-