protected byte [ ] readBytes ( BufferedReader in , String endMarker ) throws IOException { String line ; StringBuilder buf = new StringBuilder ( ) ; while ( ( line = in . readLine ( ) ) != null ) { if ( line . contains ( endMarker ) ) { break ; } buf . append ( line . trim ( ) ) ; } return this . base64 . decode ( buf . toString ( ) ) ; }
Read base64 data up to an end marker and decode them .