code: public static SipMessage frame(final Buffer buffer) throws IOException {
          if (true)
              return frame2(buffer);
  
          if (!couldBeSipMessage(buffer)) {
              throw new SipParseException(0, "Cannot be a SIP message because is doesnt start with \"SIP\" "
                      + "(for responses) or a method (for requests)");
          }
  
          // we just assume that the initial line
          // indeed is a correct sip line
          final Buffer rawInitialLine = buffer.readLine();
  
          // which means that the headers are about
          // to start now.
          final int startHeaders = buffer.getReaderIndex();
  
          Buffer currentLine = null;
          while ((currentLine = buffer.readLine()) != null && currentLine.hasReadableBytes()) {
              // just moving along, we don't really care why
              // we stop, we have found what we want anyway, which
              // is the boundary between headers and the potential
              // payload (or end of message)
          }
  
          final Buffer headers = buffer.slice(startHeaders, buffer.getReaderIndex());
          Buffer payload = null;
          if (buffer.hasReadableBytes()) {
              payload = buffer.slice();
          }
  
          if (SipInitialLine.isResponseLine(rawInitialLine)) {
              throw new RuntimeException("No longer using the old mutable sip messages");
              // return new SipResponseImpl(rawInitialLine, headers, payload);
          } else {
              throw new RuntimeException("No longer using the old mutable sip messages");
              // return new SipRequestImpl(rawInitialLine, headers, payload);
          }
      }
docs: Frame the supplied buffer into a {@link SipMessage}. No deep analysis of the message will be
  performed by this framer so there is no guarantee that this {@link SipMessage} is actually a
  well formed message.
  
  @param buffer
  @return the framed {@link SipMessage}