public Document read(String systemID) throws DocumentException, IOException, XmlPullParserException {
        if (systemID.indexOf(':') >= 0) {
            // lets assume its a URL
            return read(new URL(systemID));
        }
        else {
            // lets assume that we are given a file name
            return read(new File(systemID));
        }
    }
<p>Reads a Document from the given URL or filename.</p>
<p>
If the systemID contains a <code>':'</code> character then it is
assumed to be a URL otherwise its assumed to be a file name.
If you want finer grained control over this mechansim then please
explicitly pass in either a {@link URL} or a {@link File} instance
instead of a {@link String} to denote the source of the document.
</p>

@param systemID is a URL for a document or a file name.
@return the newly created Document instance
@throws DocumentException              if an error occurs during parsing.
@throws IOException if an error occurs during reading
@throws XmlPullParserException if an error occurs creating a pull parser
xmppserver/src/main/java/org/dom4j/io/XMPPPacketReader.java