Class HexFilterOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class HexFilterOutputStream extends AbstractEncodingFilterOutputStream
Encodes raw bytes into hexadecimal characters in the wrapped output stream.
Version:
$Revision: 2745 $
Author:
Middleware Services
  • Constructor Details

    • HexFilterOutputStream

      public HexFilterOutputStream(OutputStream out)
      Creates a hex filter output stream around the given output stream.
      Parameters:
      out - Output stream to wrap.
  • Method Details

    • writeEncoded

      protected void writeEncoded(byte[] data, int offset, int length) throws IOException
      Encode the given raw bytes and write the result to the wrapped output stream.
      Specified by:
      writeEncoded in class AbstractEncodingFilterOutputStream
      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.