ArrayOfByteArraysOutput extends AbstractRockerOutput<ArrayOfByteArraysOutput> { @Override public String toString() { byte[] bytes = toByteArray(); return new String(bytes, this.charset); } ArrayOfByteArraysOutput(ContentType contentType, String charsetName);  ArrayOfByteArraysOutput(ContentType contentType, Charset charset); List<byte[]> getArrays(); @Override ArrayOfByteArraysOutput w(String string); @Override ArrayOfByteArraysOutput w(byte[] bytes); byte[] toByteArray(); @Override String toString(); ReadableByteChannel asReadableByteChannel(); InputStream asInputStream(); static RockerOutputFactory<ArrayOfByteArraysOutput> FACTORY; }
@Test public void toStringTest() throws Exception { ArrayOfByteArraysOutput out = new ArrayOfByteArraysOutput(ContentType.HTML, "UTF-8"); out.w("T"); out.w("E"); Assert.assertEquals("TE", out.toString()); }