@Test public void shouldCorrectlyWriteTimestamp() { Timestamp now = new Timestamp(new Date()); String expected = "{ \"$ts\" : " + now.getTime() + " , \"$inc\" : " + now.getInc() + " }"; String actual = writer.write(now); assertSame(expected, actual); }
@Override public void write( Object object, OutputStream stream ) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8)); write(object, writer); writer.flush(); }
CompactJsonWriter implements JsonWriter { @Override public void write( Object object, OutputStream stream ) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8)); write(object, writer); writer.flush(); } }
CompactJsonWriter implements JsonWriter { @Override public void write( Object object, OutputStream stream ) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8)); write(object, writer); writer.flush(); }  }
CompactJsonWriter implements JsonWriter { @Override public void write( Object object, OutputStream stream ) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8)); write(object, writer); writer.flush(); }  @Override void write( Object object,
                       OutputStream stream ); @Override void write( Object object,
                       Writer writer ); @Override void write( Object object,
                       StringBuilder writer ); @Override String write( Object object ); }
CompactJsonWriter implements JsonWriter { @Override public void write( Object object, OutputStream stream ) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(stream, Json.UTF8)); write(object, writer); writer.flush(); }  @Override void write( Object object,
                       OutputStream stream ); @Override void write( Object object,
                       Writer writer ); @Override void write( Object object,
                       StringBuilder writer ); @Override String write( Object object );  }