question: @ Deprecated static CharSequence readUrl ( URL url , String charset ) throws IOException { StringBuilder buffer = new StringBuilder ( 1024 ) ; InputStream inputStream = url . openStream ( ) ; try { InputStreamReader reader = new InputStreamReader ( inputStream , charset ) ; char [ ] charArray = new char [ 1024 ] ; int charsRead = 0 ; do { charsRead = reader . read ( charArray ) ; if ( charsRead >= 0 ) { buffer . append ( charArray , 0 , charsRead ) ; } } while ( charsRead > 0 ) ; } finally { inputStream . close ( ) ; } return buffer ; }
target:  Reads content from the specified URL with specified charset into string