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, boolean raw)voidwriteArray(String name, Iterator<?> val, boolean raw)default voidwriteArray(String name, List<?> l, boolean raw)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(String name, IteratorWriter iw, boolean raw)default 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(String name, MapWriter mw)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 voidwriteStrRaw(String name, String val)Writes the specified val directly to the backing writer, without wrapping (e.g., in quotes) or escaping of any kind.default voidwriteVal(String name, Object val)default voidwriteVal(String name, Object val, boolean raw)
 
- 
- 
- 
Method Detail- 
writeValdefault void writeVal(String name, Object val) throws IOException - Throws:
- IOException
 
 - 
writeValdefault void writeVal(String name, Object val, boolean raw) throws IOException - Throws:
- IOException
 
 - 
writeStrRawdefault void writeStrRaw(String name, String val) throws IOException Writes the specified val directly to the backing writer, without wrapping (e.g., in quotes) or escaping of any kind.- 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, boolean raw) 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, boolean raw) throws IOException - Throws:
- IOException
 
 - 
writeArraydefault void writeArray(String name, List<?> l, boolean raw) 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
 
 - 
writeMapdefault void writeMap(String name, MapWriter mw) throws IOException - 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
 
 - 
writeIteratordefault void writeIterator(String name, IteratorWriter iw, boolean raw) throws IOException - 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
 
 
- 
 
-