Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Aug 15, 2019
1 parent e577983 commit 6bd59fb
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,14 @@ public final void writeFieldName(String name) throws IOException
String ns = (_nextName == null) ? "" : _nextName.getNamespaceURI();
setNextName(new QName(ns, name));
}

@Override
public void writeFieldId(long id) throws IOException {
// 15-Aug-2019, tatu: could and probably should be improved to support
// buffering but...
final String name = Long.toString(id);
writeFieldName(name);
}

@Override
public final void writeStringField(String fieldName, String value) throws IOException
Expand Down Expand Up @@ -502,6 +510,18 @@ public final void writeStartArray() throws IOException
}
}

@Override
public final void writeStartArray(Object currValue) throws IOException
{
_verifyValueWrite("start an array");
_tokenWriteContext = _tokenWriteContext.createChildArrayContext(currValue);
if (_xmlPrettyPrinter != null) {
_xmlPrettyPrinter.writeStartArray(this);
} else {
// nothing to do here; no-operation
}
}

@Override
public final void writeEndArray() throws IOException
{
Expand All @@ -528,6 +548,18 @@ public final void writeStartObject() throws IOException
}
}

@Override
public final void writeStartObject(Object currValue) throws IOException
{
_verifyValueWrite("start an object");
_tokenWriteContext = _tokenWriteContext.createChildObjectContext(currValue);
if (_xmlPrettyPrinter != null) {
_xmlPrettyPrinter.writeStartObject(this);
} else {
_handleStartObject();
}
}

@Override
public final void writeEndObject() throws IOException
{
Expand Down

0 comments on commit 6bd59fb

Please sign in to comment.