return decodeFixedLength(length);
}
}
private Array decodeInfinitiveLength() throws CborException {
Array array = new Array();
array.setChunked(true);
if (decoder.isAutoDecodeInfinitiveArrays()) {
DataItem dataItem;
for (;;) {
dataItem = decoder.decodeNext();
if (dataItem == null) {
throw new CborException("Unexpected end of stream");
}
if (Special.BREAK.equals(dataItem)) {
array.add(Special.BREAK);
break;
}
array.add(dataItem);
}
}
return array;
}