class ModuleReader implements ModuleReaderIF {

  @Override
  public Map read(InputStream source) throws IOException, SAXException {
    logger.debug("Start to read in module.");
    parser = getXMLParser();
    ModuleContentHandler handler = new ModuleContentHandler();
    handler.register(parser);
    InputSource inpsrc = new InputSource();
    if (encrypted)
      inpsrc.setByteStream(new EncryptedInputStream(source));
    else
      inpsrc.setByteStream(source);
    
    try {
      parser.parse(inpsrc);
    } catch (SAXParseException e) {
      throw new SAXException(e.getLineNumber() + ":" +
                             e.getColumnNumber() + ": " +
                             e.getMessage());
    }

    return handler.getFunctions();
  }

  public  ModuleReader(boolean encrypted);

}