code: public static EncoderOutputStream createEncoderOutputStream(OutputStream target, int bufferSize, boolean wrap) {
          return new EncoderOutputStream(target, bufferSize, wrap);
      }
docs: Creates an OutputStream wrapper which base64 encodes and writes to the passed OutputStream target. When this
  stream is closed base64 padding will be added if needed. Alternatively if this represents an "inner stream",
  the {@link FlexBase64.EncoderOutputStream#complete()}  method can be called to close out
  the inner stream without closing the wrapped target.
  
  <p>All bytes written will be queued to a buffer in the specified size. This stream, therefore, does not require
  BufferedOutputStream, which would lead to double buffering.
  
  @param target an output target to write to
  @param bufferSize the chunk size to buffer before writing to the target
  @param wrap whether or not the stream should wrap base64 output at 76 characters
  @return an encoded output stream instance.