Java Utililty Methods BufferedReader Create

List of utility methods to do BufferedReader Create

Description

The list of methods to do BufferedReader Create are organized into topic(s).

Method

ReadergetReader(final File inputFile)
Gets a Reader from the given file object.
return getReader(inputFile, null, false);
ReadergetReader(final InputStream is, final String enc)
get Reader
return getReader(is, enc, true);
BufferedReadergetReader(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);
BufferedReadergetReader(final String fileName)
Get input reader to given file.
InputStream stream = getInputStream(fileName);
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
return reader;
BufferedReadergetReader(final String fileName)
Get a BufferedReader for the file of the given fileName
return getReader(new FileInputStream(fileName));
BufferedReadergetReader(InputStream in)
get Reader
return new BufferedReader(new InputStreamReader(in, getCharEncoding()));
StringgetReader(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);
...
BufferedReadergetReader(InputStream is)
Returns a buffered reader suitable for reading the input stream.
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "ISO-8859-1"));
return reader;
ReadergetReader(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.");
...
BufferedReadergetReader(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;
...