private void nextStep(byte[] buf, int toWrite, Runnable next, boolean newMsgFlag)
    {
        if (buf != null) {
            writeBuf = ByteBuffer.wrap(buf);
            writeBuf.limit(toWrite);
        }
        else {
            writeBuf = null;
        }
        this.toWrite = toWrite;
        this.next = next;
        this.newMsgFlag = newMsgFlag;
    }
private void nextStep ( byte [ ] buf , int toWrite , Runnable next , boolean newMsgFlag ) { if ( buf != null ) { writeBuf = ByteBuffer . wrap ( buf ) ; writeBuf . limit ( toWrite ) ; } else { writeBuf = null ; } this . toWrite = toWrite ; this . next = next ; this . newMsgFlag = newMsgFlag ; }
to the buffer and schedule next state machine action.