private static boolean skipWhitespaceAndCommas ( Buffer buffer ) throws EOFException { boolean commaFound = false ; while ( ! buffer . exhausted ( ) ) { byte b = buffer . getByte ( 0 ) ; if ( b == ' ' ) { // Consume ','. buffer . readByte ( ) ; commaFound = true ; } else if ( b == ' ' || b == ' ' ) { // Consume space or tab. buffer . readByte ( ) ; } else { break ; } } return commaFound ; }
Returns true if any commas were skipped .