protected boolean containsHTTP200 ( byte [ ] data ) { boolean rc = true ; // byte comparison to check for HTTP and 200 in the response // this code is not pretty, it is designed to be fast // code assumes that HTTP/1.0 200 will be contained in one buffer // if ( data . length < 12 || data [ 0 ] != ' ' || data [ 1 ] != ' ' || data [ 2 ] != ' ' || data [ 3 ] != ' ' || data [ 9 ] != ' ' || data [ 10 ] != ' ' || data [ 11 ] != ' ' ) { rc = false ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "containsHTTP200: " + rc ) ; } return rc ; }
Checks if the byte array contains HTTP 200 in a byte array .