Package org.apache.solr.common.util
Interface TextWriter
- 
- All Superinterfaces:
- AutoCloseable,- Closeable,- PushWriter
 - All Known Subinterfaces:
- JsonTextWriter
 - All Known Implementing Classes:
- SolrJSONWriter
 
 public interface TextWriter extends PushWriter 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intdecLevel()booleandoIndent()WritergetWriter()intincLevel()default voidindent()default voidindent(int lev)intlevel()TextWritersetIndent(boolean doIndent)default voidwriteArray(String name, Object[] val)voidwriteArray(String name, Iterator val)default voidwriteArray(String name, List l)default voidwriteBool(String name, boolean val)default voidwriteBool(String name, Boolean val)voidwriteBool(String name, String val)if this form of the method is called, val is the Java string form of a booleandefault voidwriteByteArr(String name, byte[] buf, int offset, int len)voidwriteDate(String name, String val)if this form of the method is called, val is the Solr ISO8601 based date formatdefault voidwriteDate(String name, Date val)default voidwriteDouble(String name, double val)voidwriteDouble(String name, String val)if this form of the method is called, val is the Java string form of a doubledefault voidwriteFloat(String name, float val)voidwriteFloat(String name, String val)if this form of the method is called, val is the Java string form of a floatdefault voidwriteInt(String name, int val)voidwriteInt(String name, String val)if this form of the method is called, val is the Java string form of an intdefault voidwriteIterator(IteratorWriter iw)Write an array.default voidwriteLong(String name, long val)voidwriteLong(String name, String val)if this form of the method is called, val is the Java string form of a longvoidwriteMap(String name, Map val, boolean excludeOuter, boolean isFirstVal)default voidwriteMap(MapWriter mw)Write a Map.voidwriteNamedList(String name, NamedList val)voidwriteNull(String name)default voidwriteNumber(String name, Number val)voidwriteStr(String name, String val, boolean needsEscaping)default voidwriteVal(String name, Object val)
 
- 
- 
- 
Method Detail- 
writeValdefault void writeVal(String name, Object val) throws IOException - Throws:
- IOException
 
 - 
writeStrvoid writeStr(String name, String val, boolean needsEscaping) throws IOException - Throws:
- IOException
 
 - 
writeMapvoid writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException - Throws:
- IOException
 
 - 
writeArrayvoid writeArray(String name, Iterator val) throws IOException - Throws:
- IOException
 
 - 
writeNullvoid writeNull(String name) throws IOException - Throws:
- IOException
 
 - 
writeIntvoid writeInt(String name, String val) throws IOException if this form of the method is called, val is the Java string form of an int- Throws:
- IOException
 
 - 
writeLongvoid writeLong(String name, String val) throws IOException if this form of the method is called, val is the Java string form of a long- Throws:
- IOException
 
 - 
writeBoolvoid writeBool(String name, String val) throws IOException if this form of the method is called, val is the Java string form of a boolean- Throws:
- IOException
 
 - 
writeFloatvoid writeFloat(String name, String val) throws IOException if this form of the method is called, val is the Java string form of a float- Throws:
- IOException
 
 - 
writeDoublevoid writeDouble(String name, String val) throws IOException if this form of the method is called, val is the Java string form of a double- Throws:
- IOException
 
 - 
writeDatevoid writeDate(String name, String val) throws IOException if this form of the method is called, val is the Solr ISO8601 based date format- Throws:
- IOException
 
 - 
writeNamedListvoid writeNamedList(String name, NamedList val) throws IOException - Throws:
- IOException
 
 - 
getWriterWriter getWriter() 
 - 
writeNumberdefault void writeNumber(String name, Number val) throws IOException - Throws:
- IOException
 
 - 
writeArraydefault void writeArray(String name, Object[] val) throws IOException - Throws:
- IOException
 
 - 
writeArraydefault void writeArray(String name, List l) throws IOException - Throws:
- IOException
 
 - 
writeDatedefault void writeDate(String name, Date val) throws IOException - Throws:
- IOException
 
 - 
writeByteArrdefault void writeByteArr(String name, byte[] buf, int offset, int len) throws IOException - Throws:
- IOException
 
 - 
writeIntdefault void writeInt(String name, int val) throws IOException - Throws:
- IOException
 
 - 
writeLongdefault void writeLong(String name, long val) throws IOException - Throws:
- IOException
 
 - 
writeBooldefault void writeBool(String name, boolean val) throws IOException - Throws:
- IOException
 
 - 
writeFloatdefault void writeFloat(String name, float val) throws IOException - Throws:
- IOException
 
 - 
writeDoubledefault void writeDouble(String name, double val) throws IOException - Throws:
- IOException
 
 - 
writeBooldefault void writeBool(String name, Boolean val) throws IOException - Throws:
- IOException
 
 - 
writeMapdefault void writeMap(MapWriter mw) throws IOException Description copied from interface:PushWriterWrite a Map. The map is opened in the beginning of the method and closed at the end. All map entries MUST be written before this method returns- Specified by:
- writeMapin interface- PushWriter
- Throws:
- IOException
 
 - 
writeIteratordefault void writeIterator(IteratorWriter iw) throws IOException Description copied from interface:PushWriterWrite an array. The array is opened at the beginning of this method and closed at the end. All array entries must be written before this method returns- Specified by:
- writeIteratorin interface- PushWriter
- Throws:
- IOException
 
 - 
indentdefault void indent() throws IOException- Throws:
- IOException
 
 - 
incLevelint incLevel() 
 - 
decLevelint decLevel() 
 - 
setIndentTextWriter setIndent(boolean doIndent) 
 - 
levelint level() 
 - 
doIndentboolean doIndent() 
 - 
indentdefault void indent(int lev) throws IOException- Throws:
- IOException
 
 
- 
 
-