BeanIO 2.0.4

org.beanio.stream.json
Class JsonWriter

java.lang.Object
  extended by org.beanio.stream.json.JsonWriterSupport
      extended by org.beanio.stream.json.JsonWriter
All Implemented Interfaces:
RecordWriter

public class JsonWriter
extends JsonWriterSupport
implements RecordWriter

A RecordWriter implementation for writing JSON formatted record.

Since:
2.0
Author:
Kevin Seim
See Also:
JsonRecordParserFactory

Constructor Summary
JsonWriter(Writer out)
          Constructs a new JsonWriter.
JsonWriter(Writer out, JsonParserConfiguration config)
          Constructs a new JsonWriter.
 
Method Summary
 void close()
          Closes the output stream.
 void flush()
          Flushes the output stream.
 void write(Object record)
          Writes a record object to this output stream.
 
Methods inherited from class org.beanio.stream.json.JsonWriterSupport
getIndent, getLineSeparator, init, isPretty, write, writeArray, writeString, writeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonWriter

public JsonWriter(Writer out)
Constructs a new JsonWriter.

Parameters:
out -

JsonWriter

public JsonWriter(Writer out,
                  JsonParserConfiguration config)
Constructs a new JsonWriter.

Parameters:
out -
Method Detail

write

public void write(Object record)
           throws IOException
Description copied from interface: RecordWriter
Writes a record object to this output stream.

Specified by:
write in interface RecordWriter
Parameters:
record - the record object to write
Throws:
IOException - if an I/O error occurs writing the record to the stream

flush

public void flush()
           throws IOException
Description copied from interface: RecordWriter
Flushes the output stream.

Specified by:
flush in interface RecordWriter
Throws:
IOException - if an I/O error occurs flushing the stream

close

public void close()
           throws IOException
Description copied from interface: RecordWriter
Closes the output stream.

Specified by:
close in interface RecordWriter
Throws:
IOException - if an I/O error occurs closing the stream

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim