print Properties - Android java.util

Android examples for java.util:Properties

Description

print Properties

Demo Code


//package com.java2s;
import java.util.Enumeration;
import java.util.Properties;

import android.util.Log;

public class Main {
    public static void printProperties(String TAG, Properties props) {
        @SuppressWarnings("unchecked")
        Enumeration<String> propNames = (Enumeration<String>) props
                .propertyNames();//w w w  . j a  va2s  .  co  m
        while (propNames.hasMoreElements()) {
            String propName = propNames.nextElement();
            Log.d(TAG, propName + "=" + props.getProperty(propName));
        }
    }
}

Related Tutorials