List of utility methods to do BufferedReader Create
Reader | getReader(final File inputFile) Gets a Reader from the given file object. return getReader(inputFile, null, false);
|
Reader | getReader(final InputStream is, final String enc) get Reader return getReader(is, enc, true);
|
BufferedReader | getReader(final Object aReference, final String aResourceName) get Reader final InputStream resource = aReference.getClass().getResourceAsStream(aResourceName); final InputStreamReader reader = new InputStreamReader(resource); return new BufferedReader(reader); |
BufferedReader | getReader(final String fileName) Get input reader to given file. InputStream stream = getInputStream(fileName); BufferedReader reader = new BufferedReader(new InputStreamReader(stream)); return reader; |
BufferedReader | getReader(final String fileName) Get a BufferedReader for the file of the given fileName return getReader(new FileInputStream(fileName)); |
BufferedReader | getReader(InputStream in) get Reader return new BufferedReader(new InputStreamReader(in, getCharEncoding())); |
String | getReader(InputStream input) get Reader BufferedReader in = null; StringBuilder out = new StringBuilder(); try { in = new BufferedReader(new InputStreamReader(input, "UTF-8")); String line; while ((line = in.readLine()) != null) { out.append(line); out.append(NL); ... |
BufferedReader | getReader(InputStream is) Returns a buffered reader suitable for reading the input stream. BufferedReader reader = new BufferedReader(new InputStreamReader(is, "ISO-8859-1")); return reader; |
Reader | getReader(InputStream is) get Reader Reader reader = new BufferedReader(new InputStreamReader(is)); char c[] = "<?".toCharArray(); int pos = 0; reader.mark(LOOKAHEAD); while (true) { int value = reader.read(); if (value == -1) { throw new IOException("Encounter end of stream before start of XML."); ... |
BufferedReader | getReader(String fileDir, String fileName, String encoding) get Reader try { File file = new File(fileDir, fileName); InputStreamReader read = new InputStreamReader(new FileInputStream(file), encoding); BufferedReader br = new BufferedReader(read); return br; } catch (FileNotFoundException ex) { ex.printStackTrace(); return null; ... |