class GridH2Byte extends GridH2ValueMessage {
    /** */
    private byte x;

    /**
     *
     */
    public GridH2Byte() {
        // No-op.
    }

    /**
     * @param val Value.
     */
    public GridH2Byte(Value val) {
        assert val.getType() == Value.BYTE : val.getType();

        x = val.getByte();
    }

    /** {@inheritDoc} */
    @Override public Value value(GridKernalContext ctx) {
        return ValueByte.get(x);
    }

    /** {@inheritDoc} */
    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
        reader.setBuffer(buf);

        if (!reader.beforeMessageRead())
            return false;

        if (!super.readFrom(buf, reader))
            return false;

        switch (reader.state()) {
            case 0:
                x = reader.readByte("x");

                if (!reader.isLastRead())
                    return false;

                reader.incrementState();

        }

        return reader.afterMessageRead(GridH2Byte.class);
    }

    /** {@inheritDoc} */
    @Override public short directType() {
        return -6;
    }

    /** {@inheritDoc} */
    @Override public byte fieldsCount() {
        return 1;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return String.valueOf(x);
    }
}

        writer.setBuffer(buf);

        if (!super.writeTo(buf, writer))
            return false;

        if (!writer.isHeaderWritten()) {
            if (!writer.writeHeader(directType(), fieldsCount()))
                return false;

            writer.onHeaderWritten();
        }

        switch (writer.state()) {
            case 0:
                if (!writer.writeByte("x", x))
                    return false;

                writer.incrementState();

        }

        return true;
    
<methods>public non-sealed void <init>() ,public void onAckReceived() ,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public abstract Value value(org.apache.ignite.internal.GridKernalContext) throws org.apache.ignite.IgniteCheckedException,public boolean writeTo(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageWriter) <variables>