Java Properties Load from File loadApiProperties(InputStream inputStream)

Here you can find the source of loadApiProperties(InputStream inputStream)

Description

load Api Properties

License

Open Source License

Declaration

public static Properties loadApiProperties(InputStream inputStream)
            throws IOException 

Method Source Code

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

import java.io.File;
import java.io.FileInputStream;

import java.io.IOException;
import java.io.InputStream;

import java.util.Properties;

public class Main {
    public static Properties loadApiProperties(InputStream inputStream)
            throws IOException {
        Properties properties = new Properties();
        properties.load(inputStream);//from  w ww  .ja  v a2s.  c o m

        return properties;
    }

    /**
     * load the OAuth API Key and secret from the soup_api.properties file in
     * the home directory of the current user
     * 
     * @return
     * @throws IOException
     */
    public static Properties loadApiProperties() throws IOException {
        Properties properties = new Properties();
        properties.load(new FileInputStream(new File(System
                .getProperty("user.home"), "soup_api.properties")));

        return properties;
    }
}

Related

  1. load(String propertiesString)
  2. load(String resource)
  3. load(String resource)
  4. load(String[] paths, String fileName)
  5. loadAccessTokenProperties( InputStream inputStream)
  6. loadBuildProperties(File projectRootDir)
  7. loadCfg(String url)
  8. loadConfig(File settingsFile)
  9. loadConfigByPath(String path)