code: public boolean parse(ByteBuffer buffer, boolean last) {
          boolean handle = false;
          while (!handle && BufferUtils.hasContent(buffer)) {
              switch (_state) {
                  case PREAMBLE:
                      parsePreamble(buffer);
                      continue;
  
                  case DELIMITER:
                  case DELIMITER_PADDING:
                  case DELIMITER_CLOSE:
                      parseDelimiter(buffer);
                      continue;
  
                  case BODY_PART:
                      handle = parseMimePartHeaders(buffer);
                      break;
  
                  case FIRST_OCTETS:
                  case OCTETS:
                      handle = parseOctetContent(buffer);
                      break;
  
                  case EPILOGUE:
                      BufferUtils.clear(buffer);
                      break;
  
                  case END:
                      handle = true;
                      break;
  
                  default:
                      throw new IllegalStateException();
  
              }
          }
  
          if (last && BufferUtils.isEmpty(buffer)) {
              if (_state == State.EPILOGUE) {
                  _state = State.END;
  
                  if (LOG.isDebugEnabled())
                      LOG.debug("messageComplete {}", this);
  
                  return _handler.messageComplete();
              } else {
                  if (LOG.isDebugEnabled())
                      LOG.debug("earlyEOF {}", this);
  
                  _handler.earlyEOF();
                  return true;
              }
          }
  
          return handle;
      }
docs: Parse until next Event.
  
  @param buffer the buffer to parse
  @param last   whether this buffer contains last bit of content
  @return True if an RequestHandler method was called and it returned true;