class GsonJsonObjectOutput implements ObjectOutput {

    @Override
    public void writeObject(Object obj) throws IOException {
        char[] json = gson.toJson(obj).toCharArray();
        writer.write(json, 0, json.length);
        writer.println();
        writer.flush();
        json = null;
    }

    public  GsonJsonObjectOutput(OutputStream out);
    public  GsonJsonObjectOutput(Writer writer);

}