FileDocCategorySizeDatePackage
EnvironmentHelper.javaAPI DocAndroid 1.5 API1704Wed May 06 22:41:04 BST 2009org.apache.harmony.logging.tests.java.util.logging.util

EnvironmentHelper

public class EnvironmentHelper extends Object
Helper to prepare testing environment, for example, configuration files.

Fields Summary
Constructors Summary
private EnvironmentHelper()
Can't be instantiated.

    
Methods Summary
public static java.io.InputStreamPropertiesToInputStream(java.util.Properties p)

        ByteArrayOutputStream bos = null;
        try {
            bos = new ByteArrayOutputStream();
            p.store(bos, "");
            return new ByteArrayInputStream(bos.toByteArray());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        } finally {
            try {
                bos.close();
            } catch (Exception ex) {
            }
        }