code: public <E extends Throwable> void read(InputStream inputStream, BinaryOWLOntologyDocumentHandler<E> handler, OWLDataFactory df) throws IOException, BinaryOWLParseException, UnloadableImportException, E {
          checkNotNull(inputStream);
          checkNotNull(handler);
          checkNotNull(df);
  
          DataInputStream dis = BinaryOWLStreamUtil.getDataInputStream(inputStream);
          BinaryOWLOntologyDocumentPreamble preamble = new BinaryOWLOntologyDocumentPreamble(dis);
          BinaryOWLVersion fileFormatVersion = preamble.getFileFormatVersion();
  
          handler.handleBeginDocument();
          handler.handlePreamble(preamble);
  
          BinaryOWLDocumentBodySerializerSelector selector = new BinaryOWLDocumentBodySerializerSelector();
          BinaryOWLDocumentBodySerializer serializer = selector.getSerializerForVersion(fileFormatVersion);
          serializer.read(dis, handler, df);
      }
docs: Reads an {@link org.semanticweb.binaryowl.doc.OWLOntologyDocument} that is stored in binary OWL.
  @param inputStream The input stream to read the document from.  Not {@code null}.
  @param handler The handler that handels document elements as they are read.  Not {@code null}.
  @param df An {@link OWLDataFactory} that can be used to instantiate {@link org.semanticweb.owlapi.model.OWLObject}s.  Not {@code null}.
  @param <E> The type of exception thrown by the handler.
  @throws IOException If there was a problem reading from the input stream.
  @throws BinaryOWLParseException If the binary OWL format was corrupt.
  @throws UnloadableImportException If an import could not be loaded.
  @throws E A custom exception type.