private static final boolean isHeaderEnd(StringBuilder sb){
  int len=sb.length();
  if (len > 2) {
    if (LF2.equals(sb.substring(len - 2))) {
      return true;
    }
  }
  if (len > 4) {
    if (CRLF2.equals(sb.substring(len - 4))) {
      return true;
    }
  }
  return false;
}

private static final boolean isHeaderEnd ( StringBuilder sb ) { int len = sb . length ( ) ; if ( len > 2 ) { if ( LF2 . equals ( sb . substring ( len - 2 ) ) ) { return true ; } } if ( len > 4 ) { if ( CRLF2 . equals ( sb . substring ( len - 4 ) ) ) { return true ; } } return false ; }
check if the current stringbuilder trailing characters is an http header end ( empty crlf ) .
