org.apache.hadoop.tools.rumen
Class JsonObjectMapperWriter<T>
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonObjectMapperWriter
public JsonObjectMapperWriter(OutputStream output,
boolean prettyPrint)
throws IOException
- Throws:
IOException
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