@Override public byte[] writeConfiguration(T configuration) { JSONObject jsonObject = getJsonConverterInstance().toJsonObject(configuration); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); Writer writer = StringUtil.writerForStream(outStream); jsonObject.write(writer); IoUtil.flushSilently(writer); return outStream.toByteArray(); }