package com.nokia.sms.sgip.message;

import java.io.IOException;

import org.apache.mina.core.buffer.IoBuffer;

public abstract class SgipMessage {
    protected Head head;

    public abstract IoBuffer getBuffer();

    public void parse(Head head, IoBuffer ioBuffer)
            throws IOException {
        setHead(head);
        parseBody(ioBuffer);
    }

    public void setHead(Head head) {
        this.head = head;
    }

    public Head getHead() {
        return this.head;
    }

    public abstract void parseBody(IoBuffer paramIoBuffer)
            throws IOException;
}
