public static Properties openProperties(final String propertyFileName) throws IOException {

		if (propertyFileName == null) {
			return null;
		}

		InputStream inputStream = null;
		try {
			inputStream = Profile.class.getResourceAsStream(propertyFileName);
			if (inputStream != null) {
				// file could be opened
				Properties properties = new Properties();
				properties.load(inputStream);
				return properties;
			} else {
				// file doesn't exist
				return null;
			}
		} finally {
			if (inputStream != null) {
				inputStream.close();
			}
		}
	}
public static Properties openProperties(final String propertyFileName) throws IOException {

		if (propertyFileName == null) {
			return null;
		}

		InputStream inputStream = null;
		try {
			inputStream = Profile.class.getResourceAsStream(propertyFileName);
			if (inputStream != null) {
				
				Properties properties = new Properties();
				properties.load(inputStream);
				return properties;
			} else {
				
				return null;
			}
		} finally {
			if (inputStream != null) {
				inputStream.close();
			}
		}
	}
public static Properties openProperties ( final String propertyFileName ) throws IOException { if ( propertyFileName == null ) { return null ; } InputStream inputStream = null ; try { inputStream = Profile . class . getResourceAsStream ( propertyFileName ) ; if ( inputStream != null ) { // file could be opened Properties properties = new Properties ( ) ; properties . load ( inputStream ) ; return properties ; } else { // file doesn't exist return null ; } } finally { if ( inputStream != null ) { inputStream . close ( ) ; } } }
Loads properties from resources.

@param propertyFileName the property file name to load
@return the properties, or null if the properties can't be found
@throws IOException if property file can't be opened
Loads properties from resources .