@Override
    protected void init() {
        try {
            // check to see if the user is using a File or InputStream. This is
            // here for backwards compatability
            if (dataSourceStream != null) {
                final Reader r = new InputStreamReader(dataSourceStream);
                setDataSourceReader(r);
                addToCloseReaderList(r);
            } else if (dataSource != null) {
                final Reader r = new FileReader(dataSource);
                setDataSourceReader(r);
                addToCloseReaderList(r);
            }

            boolean closeMapReader = false;
            if (pzmapXML != null) {
                this.pzmapReader = new FileReader(pzmapXML);
                closeMapReader = true;
            } else if (pzmapXMLStream != null) {
                this.pzmapReader = new InputStreamReader(pzmapXMLStream);
                closeMapReader = true;
            }

            try {
                setPzMetaData(MapParser.parseMap(this.pzmapReader, this));
            } finally {
                if (closeMapReader) {
                    // only close the reader if it is one we created
                    // otherwise we will let the user handle it
                    this.pzmapReader.close();
                }
            }
        } catch (final IOException e) {
            throw new InitialisationException(e);
        } catch (final Exception e) {
            throw new InitialisationException(e);
        }
    }