public class SolrJSONWriter extends Object implements JsonTextWriter
Modifier and Type | Field and Description |
---|---|
protected boolean |
doIndent |
protected int |
level |
protected String |
namedListStyle |
hexdigits, JSON_NL_ARROFARR, JSON_NL_ARROFMAP, JSON_NL_ARROFNTV, JSON_NL_FLAT, JSON_NL_MAP, JSON_NL_STYLE
Constructor and Description |
---|
SolrJSONWriter(Writer writer) |
SolrJSONWriter(Writer writer,
String namedListStyle) |
Modifier and Type | Method and Description |
---|---|
void |
_writeChar(char c) |
void |
_writeStr(String s) |
void |
close()
done with all writing
|
int |
decLevel() |
boolean |
doIndent() |
String |
getNamedListStyle() |
Writer |
getWriter() |
int |
incLevel() |
int |
level() |
SolrJSONWriter |
setIndent(boolean doIndent) |
void |
setLevel(int level) |
SolrJSONWriter |
writeObj(Object o) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unicodeEscape, writeArray, writeArray, writeArrayCloser, writeArrayOpener, writeArraySeparator, writeBool, writeDate, writeDouble, writeFloat, writeInt, writeIterator, writeJsonIter, writeKey, writeLong, writeMap, writeMap, writeMapCloser, writeMapOpener, writeMapSeparator, writeNamedList, writeNamedListAsArrArr, writeNamedListAsArrMap, writeNamedListAsFlat, writeNamedListAsMapMangled, writeNamedListAsMapWithDups, writeNull, writeStr
indent, indent, writeArray, writeBool, writeBool, writeByteArr, writeDate, writeDouble, writeFloat, writeInt, writeLong, writeNumber, writeVal
protected final String namedListStyle
protected int level
protected boolean doIndent
public SolrJSONWriter(Writer writer)
public SolrJSONWriter writeObj(Object o) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public String getNamedListStyle()
getNamedListStyle
in interface JsonTextWriter
public void _writeChar(char c) throws IOException
_writeChar
in interface JsonTextWriter
IOException
public void _writeStr(String s) throws IOException
_writeStr
in interface JsonTextWriter
IOException
public void setLevel(int level)
public int level()
level
in interface TextWriter
public int incLevel()
incLevel
in interface TextWriter
public int decLevel()
decLevel
in interface TextWriter
public SolrJSONWriter setIndent(boolean doIndent)
setIndent
in interface TextWriter
public boolean doIndent()
doIndent
in interface TextWriter
public Writer getWriter()
getWriter
in interface TextWriter
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.