com.objsys.asn1j.runtime
Class Asn1JsonOutputStream

java.lang.Object
  extended by java.io.Writer
      extended by com.objsys.asn1j.runtime.Asn1CharOutputStream
          extended by com.objsys.asn1j.runtime.Asn1JsonOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Direct Known Subclasses:
Asn1JsonOutputBuffer

public class Asn1JsonOutputStream
extends Asn1CharOutputStream

Output stream for JSON Encoding Rules (defined by Obj-Sys). Note that setWriteWhitespace can be used to enable/disable writing of whitespace by the indent method.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
Asn1JsonOutputStream(java.io.Writer writer)
          Create a JSON output stream.
 
Method Summary
 void encodeString(java.lang.String value)
          Encode the given Java string as a JSON string.
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1CharOutputStream
close, decrLevel, flush, incrLevel, indent, setWriteWhitespace, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asn1JsonOutputStream

public Asn1JsonOutputStream(java.io.Writer writer)
Create a JSON output stream.

Method Detail

encodeString

public void encodeString(java.lang.String value)
                  throws java.io.IOException
Encode the given Java string as a JSON string. This will encode the enclosing double quotes, and will escape the string's characters as needed.

Parameters:
value - The String to encode.
Throws:
java.io.IOException