List of utility methods to do InputStreamReader Read All
String | readAll(File file) read All final StringBuilder sb = new StringBuilder(); FileInputStream input = null; Reader reader = null; try { input = new FileInputStream(file); reader = new InputStreamReader(input, "UTF-8"); int c = 0; while ((c = reader.read()) != -1) { ... |
String | readAll(InputStream input) read All StringWriter writer = new StringWriter(); readAll(input, writer); return writer.getBuffer().toString(); |
String | readAll(InputStreamReader reader) read All char[] buffer = new char[1024]; StringBuilder contents = new StringBuilder(); int len = 0; while ((len = reader.read(buffer)) != -1) { contents.append(buffer, 0, len); reader.close(); return contents.toString(); ... |
String | readAll(Reader source) Read all of the data from a source. return readAll(source, DEFAULT_BUFFER_SIZE);
|