Code example for Charset

Methods: encode

0
	public void testSerialise() throws TTransportException { 
		Producer<String> consumer = new TextProducer(HOSTNAME, PORT, POOL);
		 
		ByteBuffer bytes = consumer.serialise(TEST_MESSAGE);
		 
		assertEquals(utf8.encode(TEST_MESSAGE), bytes);
	} 
 
}