@Test public void closesUnderlyingWriter() throws Exception { Writer writer = mock(Writer.class); jsonWriter = new JsonWriter(writer); jsonWriter.close(); verify(writer).close(); }
public void close() throws JsonException { try { writer.close(); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } }
JsonWriter { public void close() throws JsonException { try { writer.close(); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } } }
JsonWriter { public void close() throws JsonException { try { writer.close(); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } } JsonWriter(Writer writer);  JsonWriter(OutputStream out); }
JsonWriter { public void close() throws JsonException { try { writer.close(); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } } JsonWriter(Writer writer);  JsonWriter(OutputStream out); final boolean isWriteNulls(); final void setWriteNulls(boolean writeNulls); void writeStartObject(); void writeEndObject(); void writeStartArray(); void writeEndArray(); void writeKey(String key); void writeString(String value); void writeValue(String value); void writeValue(long value); void writeValue(double value); void writeValue(boolean value); void writeNull(); void flush(); void close(); }
JsonWriter { public void close() throws JsonException { try { writer.close(); } catch (IOException e) { throw new JsonException(e.getMessage(), e); } } JsonWriter(Writer writer);  JsonWriter(OutputStream out); final boolean isWriteNulls(); final void setWriteNulls(boolean writeNulls); void writeStartObject(); void writeEndObject(); void writeStartArray(); void writeEndArray(); void writeKey(String key); void writeString(String value); void writeValue(String value); void writeValue(long value); void writeValue(double value); void writeValue(boolean value); void writeNull(); void flush(); void close();  }