protected List < String > getFileLocationsFromSubsystemContent ( String subsystemContent ) { String sc = subsystemContent + "," ; List < String > files = new ArrayList < String > ( ) ; boolean isFile = false ; String location = null ; int strLen = sc . length ( ) ; boolean quoted = false ; for ( int i = 0 , pos = 0 ; i < strLen ; i ++ ) { char c = sc . charAt ( i ) ; if ( ! quoted && ( c == ' ' || c == ' ' ) ) { String str = sc . substring ( pos , i ) ; pos = i + 1 ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "element : " + str ) ; } if ( str . contains ( ":=" ) ) { if ( getKey ( str ) . equals ( HDR_ATTR_LOCATION ) ) { location = getValue ( str ) ; } } else if ( str . contains ( "=" ) ) { if ( getKey ( str ) . equals ( HDR_ATTR_TYPE ) && getValue ( str ) . equals ( HDR_ATTR_VALUE_FILE ) ) { isFile = true ; } } if ( c == ' ' ) { // the delimiter of each subsystem content. if ( isFile && location != null ) { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "location : " + location ) ; } files . add ( location ) ; } location = null ; isFile = false ; } } else if ( c == ' ' ) { quoted = ! quoted ; } } return files ; }
returns the list of location attribute of which type is file in the given text of Subsystem - Content . the location may or may not be an absolute path . If there is not a mathing data returns empty List .