* @param null if there are no items.
*/
public Item decodeItem(final XDMTreeBuilder handler) throws IOException, XQueryException {
final ObjectInput input = _input;
while(true) {
final byte ev = input.readByte();
switch(ev) {
case XQEventEncoder.EV_ATOM: {
final AtomicValue atom;
try {
atom = AtomicValue.readAtomicValue(input);