private static String _read_all(final InputStream is,final int buffer_size){
  final char[] buffer=new char[buffer_size];
  final StringBuilder out=new StringBuilder();
  try {
    final Reader in=new InputStreamReader(is,"UTF-8");
    try {
      for (; ; ) {
        int rsz=in.read(buffer,0,buffer.length);
        if (rsz < 0)         break;
        out.append(buffer,0,rsz);
      }
    }
  finally {
      in.close();
    }
  }
 catch (  IOException ignored) {
  }
  return out.toString();
}

private static String _read_all ( final InputStream is , final int buffer_size ) { final char [ ] buffer = new char [ buffer_size ] ; final StringBuilder out = new StringBuilder ( ) ; try { final Reader in = new InputStreamReader ( is , "UTF-8" ) ; try { for ( ; ; ) { int rsz = in . read ( buffer , 0 , buffer . length ) ; if ( rsz < 0 ) break ; out . append ( buffer , 0 , rsz ) ; } } finally { in . close ( ) ; } } catch ( IOException ignored ) { } return out . toString ( ) ; }
reads the contents of an inputstream and returns it as a string .
