public String getContentReplayPrefixString ( int size , Charset cs ) { try { InputStreamReader isr = new InputStreamReader ( getContentReplayInputStream ( ) , cs ) ; char [ ] chars = new char [ size ] ; int count = isr . read ( chars ) ; isr . close ( ) ; if ( count > 0 ) { return new String ( chars , 0 , count ) ; } else { return "" ; } } catch ( IOException e ) { logger . log ( Level . SEVERE , "unable to get replay prefix string" , e ) ; return "" ; } }
Return a short prefix of the presumed - textual content as a String .