code: public static EncoderInputStream createEncoderInputStream(InputStream source, int bufferSize, boolean wrap) {
          return new EncoderInputStream(source, bufferSize, wrap, false);
      }
docs: Creates an InputStream wrapper which encodes a source into base64 as it is read, until the source hits EOF.
  Upon hitting EOF, a standard base64 termination sequence will be readable. Clients can simply treat this input
  stream as if they were reading from a base64 encoded file. This stream attempts to read and encode in buffer
  size chunks from the source, in order to improve overall performance. Thus, BufferInputStream is not necessary
  and will lead to double buffering.
  
  <p>This stream is not thread-safe, and should not be shared between threads, without establishing a
  happens-before relationship.</p>
  
  @param source an input source to read from
  @param bufferSize the chunk size to buffer from the source
  @param wrap whether or not the stream should wrap base64 output at 76 characters
  @return an encoded input stream instance.