public static EncoderInputStream createEncoderInputStream ( InputStream source , int bufferSize , boolean wrap ) { return new EncoderInputStream ( source , bufferSize , wrap , false ) ; }
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 .