Class Base16InputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class Base16InputStream
    extends BaseNCodecInputStream
    Provides Base16 encoding and decoding in a streaming fashion (unlimited size).

    The default behavior of the Base16InputStream is to DECODE, whereas the default behavior of the Base16OutputStream is to ENCODE, but this behavior can be overridden by using a different constructor.

    Since:
    1.15
    • Field Summary

      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors 
      Constructor Description
      Base16InputStream​(java.io.InputStream in)
      Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.
      Base16InputStream​(java.io.InputStream in, boolean doEncode)
      Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
      Base16InputStream​(java.io.InputStream in, boolean doEncode, boolean lowerCase)
      Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
      Base16InputStream​(java.io.InputStream in, boolean doEncode, boolean lowerCase, CodecPolicy decodingPolicy)
      Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
    • Method Summary

      • Methods inherited from class java.io.FilterInputStream

        close, read
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • Base16InputStream

        public Base16InputStream​(java.io.InputStream in)
        Creates a Base16InputStream such that all data read is Base16-decoded from the original provided InputStream.
        Parameters:
        in - InputStream to wrap.
      • Base16InputStream

        public Base16InputStream​(java.io.InputStream in,
                                 boolean doEncode)
        Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
        Parameters:
        in - InputStream to wrap.
        doEncode - true if we should encode all data read from us, false if we should decode.
      • Base16InputStream

        public Base16InputStream​(java.io.InputStream in,
                                 boolean doEncode,
                                 boolean lowerCase)
        Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
        Parameters:
        in - InputStream to wrap.
        doEncode - true if we should encode all data read from us, false if we should decode.
        lowerCase - if true then use a lower-case Base16 alphabet.
      • Base16InputStream

        public Base16InputStream​(java.io.InputStream in,
                                 boolean doEncode,
                                 boolean lowerCase,
                                 CodecPolicy decodingPolicy)
        Creates a Base16InputStream such that all data read is either Base16-encoded or Base16-decoded from the original provided InputStream.
        Parameters:
        in - InputStream to wrap.
        doEncode - true if we should encode all data read from us, false if we should decode.
        lowerCase - if true then use a lower-case Base16 alphabet.
        decodingPolicy - Decoding policy.