@Test public void testRenderMime() { String expected = "application/json"; ByteBuf buf = ByteBuf.wrapForWriting(new byte[expected.length()]); MediaTypes.render(JSON, buf); String actual = asAscii(buf); assertEquals(expected, actual); }
static void render(ContentType type, ByteBuf buf) { int pos = render(type, buf.array(), buf.tail()); buf.tail(pos); }
ContentType { static void render(ContentType type, ByteBuf buf) { int pos = render(type, buf.array(), buf.tail()); buf.tail(pos); } }
ContentType { static void render(ContentType type, ByteBuf buf) { int pos = render(type, buf.array(), buf.tail()); buf.tail(pos); } ContentType(MediaType mime, HttpCharset charset); }
ContentType { static void render(ContentType type, ByteBuf buf) { int pos = render(type, buf.array(), buf.tail()); buf.tail(pos); } ContentType(MediaType mime, HttpCharset charset); static ContentType of(MediaType mime); static ContentType of(MediaType mime, Charset charset); Charset getCharset(); MediaType getMediaType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
ContentType { static void render(ContentType type, ByteBuf buf) { int pos = render(type, buf.array(), buf.tail()); buf.tail(pos); } ContentType(MediaType mime, HttpCharset charset); static ContentType of(MediaType mime); static ContentType of(MediaType mime, Charset charset); Charset getCharset(); MediaType getMediaType(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }