Java Properties Load from File load(InputStream is)

Here you can find the source of load(InputStream is)

Description

load

License

Open Source License

Declaration

private static String load(InputStream is) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Main {
    private static final String NEW_LINE = System.getProperty("line.separator");

    private static String load(InputStream is) throws IOException {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(is))) {
            String line;/*from ww  w .  j  a  v  a  2 s .co m*/
            StringBuilder responseData = new StringBuilder();
            while ((line = in.readLine()) != null) {
                responseData.append(line).append(NEW_LINE);
            }
            return responseData.toString();
        }
    }
}

Related

  1. load(final Properties props, final Properties toLoad)
  2. load(final String folder, final String fileName)
  3. load(InputStream in)
  4. load(InputStream input)
  5. load(InputStream inputStream)
  6. load(InputStream stream)
  7. load(Map map, String fileName)
  8. load(Properties properties, String fileName)
  9. load(Properties props, Collection filters, File basedir)