org.apache.hadoop.tools.rumen
Class JsonObjectMapperWriter<T>

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.JsonObjectMapperWriter<T>
Type Parameters:
T - The type of the objects to be written.
All Implemented Interfaces:
Closeable

public class JsonObjectMapperWriter<T>
extends Object
implements Closeable

Simple wrapper around JsonGenerator to write objects in JSON format.


Constructor Summary
JsonObjectMapperWriter(OutputStream output, boolean prettyPrint)
           
 
Method Summary
 void close()
           
 void write(T object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonObjectMapperWriter

public JsonObjectMapperWriter(OutputStream output,
                              boolean prettyPrint)
                       throws IOException
Throws:
IOException
Method Detail

write

public void write(T object)
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2009 The Apache Software Foundation