Example usage for javax.swing.text.html.parser DTD getName

List of usage examples for javax.swing.text.html.parser DTD getName

Introduction

In this page you can find the example usage for javax.swing.text.html.parser DTD getName.

Prototype

public String getName() 

Source Link

Document

Gets the name of the DTD.

Usage

From source file:MainClass.java

public static void main(String[] args) {

    try {/*from ww  w.j ava  2s. c  o m*/
        URL u = new URL("http://www.java2s.com");
        OutputStream out = new FileOutputStream("test.htm");
        InputStream in = u.openStream();
        DTD html = DTD.getDTD("html");
        System.out.println(html.getName());
        in.close();
        out.flush();
        out.close();
    } catch (Exception e) {
        System.err.println("Usage: java PageSaver url local_file");
    }

}