A source of Ion data (text or binary) to load into memory.
A Value object representing the first value found in the stream or null if the stream is empty.
Reads the provided Ion data source into memory, constructing Value objects to represent each value found in the stream.
This approach to reading is less efficient at runtime than using the streaming Reader API (next(), stepIn(), stepOut(), etc), but is often much simpler to use.
If ionData
is a ReaderBuffer, a new Reader will be created to process it.
If it is already a Reader, it will be consumed fully.
If ionData
does not contain any values, an empty array will be returned.
A source of Ion data (text or binary) to load into memory.
An array of Value objects representing the values found in the stream.
Reads the first value from the provided Ion data source into memory, constructing a Value object to represent it.
This approach to reading is less efficient at runtime than using the streaming Reader API (next(), stepIn(), stepOut(), etc), but is often much simpler to use.
If
ionData
is a ReaderBuffer, a new Reader will be created to process it. IfionData
is already a Reader, it will be used as-is.load
will check to see if the Reader is already positioned over a value. If it is, that value will be loaded. If it is not,load
will callnext()
once.If no value is found,
load
will return null.