code: public <T> void write(final PrintWriter writer, final T object,
  			final DataTypeDescriptor<T> descriptor, final boolean indent) throws IOException {
  		if (writer == null) throw new NullPointerException("writer");
  		if (descriptor == null) throw new NullPointerException("descriptor");
  
  		JsonGenerator generator = factory.createGenerator(writer);
  		if (indent) {
  			generator.useDefaultPrettyPrinter();
  		}
  
  		write(object, descriptor, generator);
  		generator.flush();
  	}
docs: Writes an object to a writer as a JSON string, does not close the writer.