@Override public ExportedDocument read() throws IOException { if (doc != null) { if (readDone && !enableRepeatedReads) { return null; } else { readDone = true; return new TypedExportedDocumentImpl(doc); } } doc = null; return null; }
element.addAttribute(TYPE_ATTRIBUTE, getSimpleTypeId(type)); if (value != null) { element.addText(type.encode(value)); element.addAttribute(TYPE_ATTRIBUTE, TypeConstants.CONTENT); if (value != null) { readBlob(element, ctype, (Blob) value, inlineBlobs); readComplex(element, ctype, (Map) value, inlineBlobs); if (value != null) { if (value instanceof List) { readList(element, (ListType) type, (List) value, inlineBlobs); } else if (value.getClass().getComponentType() != null) { readList(element, (ListType) type, PrimitiveArrays.toList(value), inlineBlobs); } else { throw new IllegalArgumentException("A value of list type is neither list neither array: " + value);