code: @Override
      public final Buffer readLine() throws IOException {
          final int start = getReaderIndex();
          boolean foundCR = false;
          while (hasReadableBytes()) {
              final byte b = readByte();
              switch (b) {
                  case LF:
                      return slice(start, getReaderIndex() - (foundCR ? 2 : 1));
                  case CR:
                      foundCR = true;
                      break;
                  default:
                      if (foundCR) {
                          setReaderIndex(getReaderIndex() - 1);
                          // return slice(start, this.lowerBoundary + this.readerIndex - 1);
                          return slice(start, getReaderIndex() - 1);
                      }
              }
          }
  
          // i guess there were nothing for us to read
          if (start >= getReaderIndex()) {
              return null;
          }
  
          return slice(start, getReaderIndex());
      }
docs: {@inheritDoc}