DissectionURLManager urlManager = new MyDissectionURLManager();
DocumentInformationImpl information = new DocumentInformationImpl();
information.setDocumentURL(new MarinerURL("document-url.xml"));
System.out.println("Page Size=" + pageSize);
characteristics.setMaxPageSize(pageSize);
DissectedDocument dissectedDocument =
dissector.createDissectedDocument(context, characteristics,
dissectionDocument, urlManager, information);
// Interate over the shards.
RequestedShards shards = dissectedDocument.createRequestedShards();
int dissectableArea = 0;
ShardIterator iterator =
dissectedDocument.getShardIterator(context, dissectableArea);
int count = 0;
while (iterator.hasMoreShards()) {
iterator.populateNextShard();
count += 1;
}