List of usage examples for io.netty.util CharsetUtil UTF_16
Charset UTF_16
To view the source code for io.netty.util CharsetUtil UTF_16.
Click Source Link
From source file:org.opendaylight.groupbasedpolicy.jsonrpc.JsonRpcDecoderTest.java
License:Open Source License
@Test(expected = DecoderException.class) public void testDecodeInvalidEncoding() throws Exception { ch.writeInbound(copiedBuffer(testJson, CharsetUtil.UTF_16)); ch.finish();/*from ww w .j a v a2 s.c om*/ }
From source file:org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcDecoderTest.java
License:Open Source License
/** * Test whether decoder throws appropriate DecoderException when * passing a Json string using an unsupported (i.e., UTF-16) * character set./*ww w . j a v a 2 s . c o m*/ * @throws Exception */ @Test(expected = DecoderException.class) public void testDecodeInvalidEncoding() throws Exception { ch.writeInbound(copiedBuffer(testJson, CharsetUtil.UTF_16)); ch.finish(); }