@Override
    protected void init() {
        try {
            // check to see if the user is using a File or InputStream. This is
            // here for backwards compatibility
            initStreamOrSource();

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

            if (this.pzmapReader != null) {
                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();
                    }
                }
            }

            setInitialised(true);
        } catch (final IOException e) {
            throw new InitialisationException(e);
        } catch (final Exception e) {
            throw new InitialisationException(e);
        }
    }