GeoUtils.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:AugmentedOxford 作者:
@Deprecated
private Document getDocumentFromUrl(String url) throws IOException,
        MalformedURLException, ProtocolException,
        FactoryConfigurationError, ParserConfigurationException,
        SAXException {
    HttpURLConnection urlConnection = (HttpURLConnection) new URL(url)
            .openConnection();
    urlConnection.setRequestMethod("GET");
    urlConnection.setDoOutput(true);
    urlConnection.setDoInput(true);
    urlConnection.connect();

    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    // get the kml file. And parse it to get the coordinates(direction
    // route):
    Document doc = db.parse(urlConnection.getInputStream());
    return doc;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号