import java.nio.ByteBuffer;
import org.webpieces.data.api.DataWrapper;
import org.webpieces.httpparser.api.dto.HttpPayload;
public interface HttpParser {
ByteBuffer marshalToByteBuffer(HttpPayload request);
<BUG>byte[] marshalToBytes(HttpPayload request);</BUG>
String marshalToString(HttpPayload request);
Memento prepareToParse();
Memento parse(Memento state, DataWrapper moreData);
HttpPayload unmarshal(byte[] msg);
}

import java.nio.ByteBuffer;
import org.webpieces.data.api.DataWrapper;
import org.webpieces.httpparser.api.dto.HttpPayload;
public interface HttpParser {
ByteBuffer marshalToByteBuffer(HttpPayload request);
String marshalToString(HttpPayload request);
Memento prepareToParse();
Memento parse(Memento state, DataWrapper moreData);
HttpPayload unmarshal(byte[] msg);
