public BioCDocument readDocument()
      throws XMLStreamException {

    if (reader.document != null) {
      BioCDocument thisDocument = reader.document;
      reader.read();
      return thisDocument;
    } else {
      return null;
    }
  }
public BioCDocument readDocument ( ) throws XMLStreamException { if ( reader . document != null ) { BioCDocument thisDocument = reader . document ; reader . read ( ) ; return thisDocument ; } else { return null ; } }
Reads one BioC document from the XML file.

@return the BioC document
@throws XMLStreamException if an unexpected processing error occurs