Class BaseNCodecOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.commons.codec.binary.BaseNCodecOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Direct Known Subclasses:
Base16OutputStream, Base32OutputStream, Base64OutputStream

Abstract superclass for Base-N output streams.

To write the EOF marker without closing the stream, call eof() or use an Apache Commons IO CloseShieldOutputStream.

Since:
1.5
  • Field Summary

    Fields inherited from class java.io.FilterOutputStream

    out
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseNCodecOutputStream(OutputStream outputStream, BaseNCodec basedCodec, boolean doEncode)
    TODO should this be protected?
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this output stream and releases any system resources associated with the stream.
    void
    eof()
    Writes EOF.
    void
    Flushes this output stream and forces any buffered output bytes to be written out to the stream.
    boolean
    Returns true if decoding behavior is strict.
    void
    write(byte[] array, int offset, int len)
    Writes len bytes from the specified b array starting at offset to this output stream.
    void
    write(int i)
    Writes the specified byte to this output stream.

    Methods inherited from class java.io.FilterOutputStream

    write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseNCodecOutputStream

      public BaseNCodecOutputStream(OutputStream outputStream, BaseNCodec basedCodec, boolean doEncode)
      TODO should this be protected?
      Parameters:
      outputStream - the underlying output or null.
      basedCodec - a BaseNCodec.
      doEncode - true to encode, false to decode, TODO should be an enum?
  • Method Details