small fix check for charset throw IllegalStateException as described on RenderKit.createResponseWriter