232425262728293031323334
HTMLReaderHome home = (HTMLReaderHome)PortableRemoteObject.narrow(objref, HTMLReaderHome.class); HTMLReader htmlReader = home.create(); StringBuffer contents = htmlReader.getContents(); System.out.println("The contents of the HTML page follows:\n"); System.out.print(contents); System.exit(0);
114115116117118119120121122123124
StyleSheet styles = getStyleSheet(); StyleSheet ss = new StyleSheet(); ss.addStyleSheet(styles); HTMLDocument doc = new CustomHTMLDocument(ss); doc.setParser(getParser()); doc.setAsynchronousLoadPriority(4); doc.setTokenThreshold(100); return doc; }