|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.odysseus.staxon.json.stream.util.AutoArrayTarget
public class AutoArrayTarget
Target filter to auto-insert array boundaries.
Note: this class caches all events and flushes to the
underlying target after receiving the last close-object
event, which may cause memory issues for large documents.
Also, auto-recognition of array boundaries never creates
arrays with a single element.
It is recommended to handle array boundaries via the
JsonXMLStreamWriter.writeStartArray(String) and
JsonXMLStreamWriter.writeEndArray() methods
or by producing <?xml-muliple ...?>
processing instructions.
| Constructor Summary | |
|---|---|
AutoArrayTarget(JsonStreamTarget delegate)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
endArray()
End array. |
void |
endObject()
End object. |
void |
flush()
|
void |
name(String name)
Write name. |
void |
startArray()
Start array. |
void |
startObject()
Start object |
void |
value(Object value)
Write value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoArrayTarget(JsonStreamTarget delegate)
| Method Detail |
|---|
public void name(String name)
throws IOException
JsonStreamTarget
name in interface JsonStreamTargetIOException
public void value(Object value)
throws IOException
JsonStreamTarget
value in interface JsonStreamTargetIOException
public void startObject()
throws IOException
JsonStreamTarget
startObject in interface JsonStreamTargetIOException
public void endObject()
throws IOException
JsonStreamTarget
endObject in interface JsonStreamTargetIOException
public void startArray()
throws IOException
JsonStreamTarget
startArray in interface JsonStreamTargetIOException
public void endArray()
throws IOException
JsonStreamTarget
endArray in interface JsonStreamTargetIOException
public void close()
throws IOException
close in interface CloseableIOException
public void flush()
throws IOException
flush in interface FlushableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||