Java Properties Load from File loadAccessTokenProperties( InputStream inputStream)

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

Description

load Access Token Properties

License

Open Source License

Declaration

public static Properties loadAccessTokenProperties(
            InputStream inputStream) 

Method Source Code

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

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

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

import java.util.Properties;

public class Main {
    public static Properties loadAccessTokenProperties(
            InputStream inputStream) {
        Properties properties = new Properties();

        try {// w ww  .  j  a v a2  s .co  m
            properties.load(inputStream);
        } catch (IOException ioException) {
            // ignore
        }

        return properties;
    }

    public static Properties loadAccessTokenProperties() {
        try {
            return loadAccessTokenProperties(new FileInputStream(new File(
                    System.getProperty("user.home"),
                    "soup_accesstoken.properties")));
        } catch (FileNotFoundException fileNotFoundException) {
            return new Properties();
        }
    }
}

Related

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