Here you can find the source of getPropertiesWithPrefix(Properties pro, String prefix)
static public Properties getPropertiesWithPrefix(Properties pro, String prefix)
//package com.java2s; // it under the terms of the GNU Lesser General Public License as published by import java.util.*; public class Main { static public Properties getPropertiesWithPrefix(Properties pro, String prefix) {//from ww w .jav a 2 s . com Enumeration en; Properties aux = new Properties(); en = pro.propertyNames(); for (; en.hasMoreElements();) { String nom = (String) en.nextElement(); if (nom.startsWith(prefix)) { aux.setProperty(nom.substring(prefix.length()), pro.getProperty(nom)); } } return aux; } }