src/org/jnetpcap/nio/JBuffer.java
public int findUTF8String(int index, char... delimeter) {

		final int size = size();

		int searchedLength = 0;
		int match = 0;
		for (int i = index; i < size; i++) {

			char c = getUTF8Char(i);
			char d = delimeter[match];

			if (Character.isDefined(c) == false) {
				break;
			}

			if (d == c) {
				match++;

				if (match == delimeter.length) {
					searchedLength = i - index + 1;
					break;
				}
			} else {
				match = 0;
			}
		}

		return searchedLength;
	}
/**
	 * Find the delimiter array of chars within the buffer.
	 * 
	 * @param index
	 *          starting offset into the buffer
	 * @param delimeter
	 *          array of chars to search for
	 * @return number of delimeter chars matched
	 */
Find the delimiter array of chars within the buffer.

@param index
starting offset into the buffer
@param delimeter
array of chars to search for
@return number of delimeter chars matched
Find the delimiter array of chars within the buffer . @param index starting offset into the buffer @param delimeter array of chars to search for @return number of delimeter chars matched
public int findUTF8String(int index, char... delimeter) {
		final int size = size();
		int searchedLength = 0;
		int match = 0;
		for (int i = index; i < size; i++) {
			char c = getUTF8Char(i);
			char d = delimeter[match];
			if (Character.isDefined(c) == false) {
				break;
			}
			if (d == c) {
				match++;
				if (match == delimeter.length) {
					searchedLength = i - index + 1;
					break;
				}
			} else {
				match = 0;
			}
		}
		return searchedLength;
	}
public int findUTF8String ( int index , char ... delimeter ) { final int size = size ( ) ; int searchedLength = 0 ; int match = 0 ; for ( int i = index ; i < size ; i ++ ) { char c = getUTF8Char ( i ) ; char d = delimeter [ match ] ; if ( Character . isDefined ( c ) == false ) { break ; } if ( d == c ) { match ++ ; if ( match == delimeter . length ) { searchedLength = i - index + 1 ; break ; } } else { match = 0 ; } } return searchedLength ; }
Find the delimiter array of chars within the buffer.
Find the delimiter array of chars within the buffer .