public static int findNewLine(byte[] arr, int offset) {
		int len = arr.length - 1;
		int i = offset;
		for (; i < len; i++)
			if (arr[i] == (byte) '\r' && arr[i + 1] == (byte) '\n')
				return i;
		return i;// the end of input will be handled like newline
	}