private static void addAttributes ( String data , Map < String , ArrayList < String > > attribs ) { String key ; String value ; int keyIndex = 0 ; int dataLen = data . length ( ) ; for ( keyIndex = 0 ; keyIndex < dataLen ; keyIndex ++ ) { if ( ( data . charAt ( keyIndex ) == USER_ATTRIB_DELIM ) && ( data . charAt ( keyIndex - 1 ) != ' ' ) ) { key = data . substring ( 0 , keyIndex ) ; value = data . substring ( keyIndex + 1 , dataLen ) ; ArrayList < String > list = convertStringToArrayList ( value ) ; if ( list != null ) { attribs . put ( key , list ) ; } } } }
Given a specified String parse to find attributes and add to specified Map .