Java Properties Load from File loadReader(Reader stream)

Here you can find the source of loadReader(Reader stream)

Description

load Reader

License

Open Source License

Declaration

private static String loadReader(Reader stream) throws IOException 

Method Source Code


//package com.java2s;
//    it under the terms of the GNU General Public License as published by

import java.io.BufferedReader;
import java.io.IOException;

import java.io.Reader;

public class Main {
    private static String loadReader(Reader stream) throws IOException {
        BufferedReader r = null;//from  w  w  w  . j  a v  a 2s .  c o m
        StringBuilder text = new StringBuilder();
        try {
            r = new BufferedReader(stream);

            String line = null;
            while ((line = r.readLine()) != null) {
                text.append(line);
                text.append(System.getProperty("line.separator"));
            }
        } finally {
            if (r != null) {
                r.close();
            }
        }
        return text.toString();
    }
}

Related

  1. loadPropertiesFromFile(String pathname)
  2. loadPropertiesFromPath(String propsFilePath)
  3. loadPropertiesInClassPath(String propertiesFileName)
  4. loadProvidersConfiguration(Class base, String confPropertiesName)
  5. loadPythonScript(String pythonScriptName)
  6. loadRecursively(String propertiesFilename)
  7. loadRQGProperties()
  8. loadSetting(InputStream in, String key)
  9. loadSettings(String propertiesFileName)