docs: public static int lineEnd(ByteBuffer buffer, int maxLength) {
  		int primitivePosition = buffer.position();
  		boolean canEnd = false;
  		int charIndex = primitivePosition;
  		byte b;
  		while (buffer.hasRemaining()) {
  			b = buffer.get();
  			charIndex++;
  			if (b == StrUtil.C_CR) {
  				canEnd = true;
  			} else if (b == StrUtil.C_LF) {
  				return canEnd ? charIndex - 2 : charIndex - 1;
  			} else {
  				// 只有\r无法确认换行
  				canEnd = false;
  			}
  
  			if (charIndex - primitivePosition > maxLength) {
  				// 查找到尽头，未找到，还原位置
  				buffer.position(primitivePosition);
  				throw new IndexOutOfBoundsException(StrUtil.format("Position is out of maxLength: {}", maxLength));
  			}
  		}
  
  		// 查找到buffer尽头，未找到，还原位置
  		buffer.position(primitivePosition);
  		// 读到结束位置
  		return -1;
  	}