public Map < String , Object > getEMailParams ( String strMessage ) { Map < String , Object > properties = new Hashtable < String , Object > ( ) ; int iIndex = this . getStartNextPropertyKey ( - 1 , strMessage ) ; while ( iIndex != - 1 ) { int iIndexEnd = strMessage . indexOf ( END_OF_KEY_CHAR , iIndex ) ; if ( iIndexEnd == - 1 ) break ; String strKey = strMessage . substring ( iIndex , iIndexEnd ) ; if ( strKey . indexOf ( ' ' ) != - 1 ) strKey = strKey . substring ( strKey . lastIndexOf ( ' ' ) + 1 ) ; iIndex = this . getStartNextPropertyKey ( iIndexEnd + 1 , strMessage ) ; if ( iIndex >= iIndexEnd ) { for ( iIndexEnd = iIndexEnd + 1 ; iIndexEnd < iIndex ; iIndexEnd ++ ) { char chChar = strMessage . charAt ( iIndexEnd ) ; if ( ! this . isLeadingWhitespace ( chChar ) ) break ; // Start of value } if ( iIndex == - 1 ) break ; for ( int i = iIndex - 1 ; i >= iIndexEnd ; i -- ) { char chChar = strMessage . charAt ( i ) ; if ( ! this . isLeadingWhitespace ( chChar ) ) { String strValue = strMessage . substring ( iIndexEnd , i + 1 ) ; this . putProperty ( properties , strKey , strValue ) ; break ; } } } } return properties ; }
Scan through this message and get the params to descriptions map .