Load properties from an inputStream

@param reader
the reader to property source
@return the properties loaded from the reader specified
199644
public static Properties loadProperties(Reader reader) {
        Properties prop = new Properties();
        try {
            prop.load(reader);
        } catch (IOException e) {
            throw E.ioException(e);
        } finally {
            IO.close(reader);
        }
        return prop;
    }
648901
public static PropertiesSettings from(InputStream stream) throws IOException
    {
        Properties properties = new Properties();
        properties.load(stream);
        return from(properties);
    }
512860
@Nonnull
    public static Properties loadProperties(@Nonnull String properties) throws IOException {
        Properties p = new Properties();
        p.load(new StringReader(properties));
        return p;
    }
813565
public static function getProperties(Reader $reader, ReflectionClass $class)
    {
        $props  = $class->getProperties();
        $result = [];

        foreach ($props as $property) {
            // skip statics
            if ($property->isStatic()) {
                continue;
            }

            // check whether we have an exclude annotation
            $exclude = $reader->getPropertyAnnotation($property, Annotation\Exclude::class);
            if ($exclude !== null) {
                continue;
            }

            // get the property name
            $key  = $reader->getPropertyAnnotation($property, Annotation\Key::class);
            $name = null;

            if ($key !== null) {
                $name = $key->getKey();
            }

            if (empty($name)) {
                $name = $property->getName();
            }

            $result[$name] = $property;
        }

        return $result;
    }
620562
private Properties loadProperties() {

        props = new Properties();

        try {
            InputStream in = Version.class.getResourceAsStream("version.properties");
            props.load(in);
            in.close();
        } catch (Exception e) {
            throw new Error("Missing version.properties");
        }

        return props;
    }
732933
public static Properties loadProperties(Class<?> clazz, String fileName) throws IOException {
        Properties properties = new Properties();
        try (InputStream is = clazz.getClassLoader().getResourceAsStream(fileName)) {
            properties.load(is);
        }
        return properties;
    }
1051379
public static Stream<String> lines(final Reader reader) {
        N.checkArgNotNull(reader);

        return of(createLazyLineIterator(null, null, Charsets.UTF_8, reader, false));
    }
787909
private static Reader loadInputStream(InputStream propertiesStream) throws IOException {
        StringBuilder buff = new StringBuilder();

        try (InputStreamReader isr = new InputStreamReader(propertiesStream, Charset.defaultCharset());
                BufferedReader reader = new BufferedReader(isr)) {
            String line;
            while ((line = reader.readLine()) != null) {
                buff.append(line).append("\n");
            }
        }

        return new StringReader(StrSubstitutor.replaceSystemProperties(buff.toString()));
    }
620020
public static Properties readFilelistToProperties(final File input) throws IOException
	{
		final List<String> list = readLinesInList(input, null);
		final Properties prop = new Properties();
		for (int i = 0; i < list.size(); i++)
		{
			final String element = list.get(i);
			prop.put(i + "", element);
		}
		return prop;
	}
1093302
public static Properties readPropertiesFromClassLoader(String resource) {
        Properties properties = new Properties();
        try {
            properties.load(FsCrawlerUtil.class.getClassLoader().getResourceAsStream(resource));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return properties;
    }
268910
@Override
    public synchronized ContentProperties read()
        throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {

        if (jParser == null) {
            JsonFactory jfactory = new JsonFactory();
            jParser = jfactory.createJsonParser(this.propertiesFile);
            jParser.nextToken(); //skips the first [

            //skip properties already read.
            int itemsRead = (int) getItemsRead();
            for (int i = 0; i < itemsRead; i++) {
                doRead();
            }
        }

        return doRead();
    }
1325894
protected static Properties loadConfig(String source, InputStream is) {
    try {
      Properties p = new Properties();
      p.load(is);
      // trim the value as it may have trailing white-space
      Set<String> keys = p.stringPropertyNames();
      for(String key: keys) {
        p.setProperty(key, p.getProperty(key).trim());
      }
      return p;
    } catch (IllegalArgumentException iae) {
      throw iae;
    } catch (Exception ex) {
      throw new IllegalArgumentException("Failed to load configuration from [" + source + "]");
    }
  }
512413
public static <T> T load(Reader reader ) {
		Yaml yaml = createYmlObject();

		Map<String,Object> data = (Map<String, Object>) yaml.load(reader);

		try {
			reader.close();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}

		return load(data);
	}
135544
public static PropertiesConfigurationSource create(Reader reader, int priority)
      throws ConfigurationException, IOException {
    return new PropertiesConfigurationSource(createPropertiesConfiguration(reader), priority);
  }
1249085
public <T> T read(final Reader reader, final DataTypeDescriptor<T> descriptor) {
		try {
			return jsonFormat.read(reader, descriptor);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
1023133
public static List<Certificate> loadCertificates(final Reader reader) throws IOException,
            CertificateException {
        try (PEMParser pemParser = new PEMParser(reader)) {
            List<Certificate> certificates = new ArrayList<>();

            JcaX509CertificateConverter certificateConverter = new JcaX509CertificateConverter()
                    .setProvider(BouncyCastleProvider.PROVIDER_NAME);
            Object certObj = pemParser.readObject();

            if (certObj instanceof X509CertificateHolder) {
                X509CertificateHolder certificateHolder = (X509CertificateHolder) certObj;
                certificates.add(certificateConverter.getCertificate(certificateHolder));
            }

            return certificates;
        }
    }
1269911
public static Properties load(File file) throws IOException {
		FileInputStream input = new FileInputStream(file);
		Properties properties = null;
		try {
			properties = load(input);
		} finally {
			IOUtils.close(input);
		}
		return properties;
	}