Java Properties Load from InputStream loadProperties(InputStream inputStream, Properties result)

Here you can find the source of loadProperties(InputStream inputStream, Properties result)

Description

ADD THIS METHOD FOR TESTING WITH ECLIPSE 3.5

License

Open Source License

Declaration

private static void loadProperties(InputStream inputStream, Properties result)
        throws BackingStoreException, IOException 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2011 Ericsson and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*w  w w .  j  a  va  2 s  . c  om*/
 *    Ericsson - initial API and implementation
 *******************************************************************************/

import java.io.BufferedInputStream;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.osgi.service.prefs.BackingStoreException;

public class Main {
    /**
     * ADD THIS METHOD FOR TESTING WITH ECLIPSE 3.5
     * 
     */
    private static void loadProperties(InputStream inputStream, Properties result)
            throws BackingStoreException, IOException {

        //Properties result = new Properties();
        InputStream input = null;
        try {
            input = new BufferedInputStream(inputStream);
            result.load(input);
        } finally {
            if (input != null) {
                input.close();
                input = null;
                //FileUtil.safeClose(input);
            }
        }
        //return result;
    }
}

Related

  1. loadProperties(InputStream input)
  2. loadProperties(InputStream input)
  3. loadProperties(InputStream inputStream)
  4. loadProperties(InputStream inputStream)
  5. loadProperties(InputStream inputStream)
  6. loadProperties(InputStream stream)
  7. loadProperties(Properties props, InputStream inputStream)
  8. loadPropertiesFileFromStream(InputStream stream)
  9. loadPropertiesFromStream(InputStream inputStream)