int newOffset = bodyStartPosition + bodyLength;
    private void handleError(ByteBuffer buffer, String text, boolean disconnect)            throws MessageParseException {        // TODO allow configurable recovery position        //int newOffset = messageStartPosition + 1;        // Following recovery position is compatible with QuickFIX C++        // but drops messages unnecessarily in corruption scenarios.        int newOffset = bodyStartPosition + bodyLength;        int nextHeader = indexOf(buffer, newOffset, headerBytes);        if (nextHeader != -1) {            buffer.position(nextHeader);        } else {            buffer.position(buffer.limit());        }        position = 0;        state = SEEKING_HEADER;        // TODO log in session log, if possible        log.error(text);        if (disconnect) {            throw new MessageParseException(text + " (during logon)");        }    }