public final int loadFromBuffer(byte[] buf, int offset) {
        if ((buf.length - offset) < getNetworkSize())
            throw new IndexOutOfBoundsException("Insufficient Data");

        offset = super.loadFromBuffer(buf, offset);
        if (!isEchoReply() && !isEchoRequest())
            throw new IllegalArgumentException("Invalid type, must be echo request/reply packet");

        m_sent = 0;
        for (int x = 0; x < 8; x++) {
            m_sent <<= 8;
            m_sent |= byteToLong(buf[offset++]);
        }

        m_recv = 0;
        for (int x = 0; x < 8; x++) {
            m_recv <<= 8;
            m_recv |= byteToLong(buf[offset++]);
        }

        m_tid = 0;
        for (int x = 0; x < 8; x++) {
            m_tid <<= 8;
            m_tid |= byteToLong(buf[offset++]);
        }

        m_rtt = 0;
        for (int x = 0; x < 8; x++) {
            m_rtt <<= 8;
            m_rtt |= byteToLong(buf[offset++]);
        }

        if (m_pad == null)
            m_pad = new byte[PAD_SIZE];
        for (int x = 0; x < PAD_SIZE; x++)
            m_pad[x] = buf[offset++];

        return offset;
    }