@Override public IoBuffer encodeMessage(final BinaryContext context, final Object objectMessage) throws Exception { final org.openscada.da.data.message.SubscribeFolder value = (org.openscada.da.data.message.SubscribeFolder) objectMessage; final IoBuffer data = IoBuffer.allocate(64); data.setAutoExpand(true); // encode message base data.putInt(MESSAGE_CODE); // number of fields data.put(((byte) 1)); // encode attributes context.encodeStringCollection(data, ((byte) 1), value.getLocation()); data.flip(); return data; }