Code example for WritableByteChannel

Methods: write

0
      StringWriter out  = new StringWriter(10240);
      ObjectMapper mapper = new ObjectMapper();
      mapper.writeValue(out, config);
      out.close();
      byte[] dataBytes = out.toString().getBytes();
      destChannel.write(ByteBuffer.wrap(dataBytes));
	} 
	 
	private void doGetConfig(DatabusRequest request) throws IOException, 
			RequestProcessingException 
	{ 
		ServerContainer.RuntimeConfig config = request.getConfig();
		serializeConfig(config, request.getResponseContent());
	} 
 
	private void doPutConfig(DatabusRequest request) throws IOException, 
			RequestProcessingException 
	{ 
		Properties cmdParams = request.getParams();
		try 
		{