class KMLPeeker implements StartElementInspector {

    public boolean isKml(URL url)
    {
        boolean isKml = false;

        try
        {
            InputStream stream = openStream(url);

            if (stream != null)
            {
                try
                {
                    isKml = XMLUtilities.canUnmarshal(stream, this);

                    // Now check if a kmz.
                    if (!isKml)
                    {
                        stream.close();
                        stream = openStream(url);

                        if (stream != null)
                        {
                            isKml = StreamUtilities.isZipInputStreamNoReset(stream);
                        }
                    }
                }
                finally
                {
                    if (stream != null)
                    {
                        stream.close();
                    }
                }
            }
        }
        catch (IOException | GeneralSecurityException | URISyntaxException e)
        {
            LOGGER.error(e.getMessage(), e);
        }

        return isKml;
    }

    public  KMLPeeker(Toolbox toolbox);

}