private static String getDeliveryReceiptValue ( String attrName , String source ) throws IndexOutOfBoundsException { String tmpAttr = attrName + ":" ; int startIndex = source . indexOf ( tmpAttr ) ; if ( startIndex < 0 ) { return null ; } startIndex = startIndex + tmpAttr . length ( ) ; int endIndex = source . indexOf ( " " , startIndex ) ; if ( endIndex > 0 ) { return source . substring ( startIndex , endIndex ) ; } return source . substring ( startIndex ) ; }
Get the delivery receipt attribute value .