Class StreamSourceDelegate
- java.lang.Object
-
- org.apache.synapse.commons.staxon.core.json.stream.util.StreamSourceDelegate
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Location,JsonStreamSource
- Direct Known Subclasses:
AddRootSource
public class StreamSourceDelegate extends Object implements JsonStreamSource
Delegating stream source.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource
JsonStreamSource.Value
-
-
Field Summary
-
Fields inherited from interface org.apache.synapse.commons.staxon.core.json.stream.JsonStreamSource
FALSE, NULL, TRUE
-
-
Constructor Summary
Constructors Constructor Description StreamSourceDelegate(JsonStreamSource delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcopy(JsonStreamTarget target)Copy events to given target untilpeek() == JsonStreamToken.NONE.voidendArray()ConsumeJsonStreamToken.END_ARRAYtoken.voidendObject()ConsumeJsonStreamToken.END_OBJECTtoken.intgetCharacterOffset()intgetColumnNumber()intgetLineNumber()StringgetPublicId()StringgetSystemId()Stringname()ConsumeJsonStreamToken.NAMEtoken.JsonStreamTokenpeek()Peek next token.voidstartArray()ConsumeJsonStreamToken.START_ARRAYtoken.voidstartObject()ConsumeJsonStreamToken.START_OBJECTtoken.JsonStreamSource.Valuevalue()ConsumeJsonStreamToken.VALUEtoken.
-
-
-
Constructor Detail
-
StreamSourceDelegate
public StreamSourceDelegate(JsonStreamSource delegate)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceLocation
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceLocation
-
name
public String name() throws IOException
Description copied from interface:JsonStreamSourceConsumeJsonStreamToken.NAMEtoken.- Specified by:
namein interfaceJsonStreamSource- Returns:
- name
- Throws:
IOException
-
getCharacterOffset
public int getCharacterOffset()
- Specified by:
getCharacterOffsetin interfaceLocation
-
value
public JsonStreamSource.Value value() throws IOException
Description copied from interface:JsonStreamSourceConsumeJsonStreamToken.VALUEtoken.- Specified by:
valuein interfaceJsonStreamSource- Returns:
- value
- Throws:
IOException
-
startObject
public void startObject() throws IOExceptionDescription copied from interface:JsonStreamSourceConsumeJsonStreamToken.START_OBJECTtoken.- Specified by:
startObjectin interfaceJsonStreamSource- Throws:
IOException
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceLocation
-
endObject
public void endObject() throws IOExceptionDescription copied from interface:JsonStreamSourceConsumeJsonStreamToken.END_OBJECTtoken.- Specified by:
endObjectin interfaceJsonStreamSource- Throws:
IOException
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceLocation
-
startArray
public void startArray() throws IOExceptionDescription copied from interface:JsonStreamSourceConsumeJsonStreamToken.START_ARRAYtoken.- Specified by:
startArrayin interfaceJsonStreamSource- Throws:
IOException
-
endArray
public void endArray() throws IOExceptionDescription copied from interface:JsonStreamSourceConsumeJsonStreamToken.END_ARRAYtoken.- Specified by:
endArrayin interfaceJsonStreamSource- Throws:
IOException
-
peek
public JsonStreamToken peek() throws IOException
Description copied from interface:JsonStreamSourcePeek next token.- Specified by:
peekin interfaceJsonStreamSource- Returns:
- token
- Throws:
IOException
-
copy
public void copy(JsonStreamTarget target) throws IOException
Copy events to given target untilpeek() == JsonStreamToken.NONE. This method does not close streams.- Parameters:
target-- Throws:
IOException
-
-