Changeset 11418
- Timestamp:
- 2006-03-21T09:30:08+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/java/org/nzdl/gsdl/GsdlCollageApplet/CURL.java
r11417 r11418 27 27 28 28 try { 29 url = new URL(url_str); 30 input = url.openStream(); 29 url = new URL(url_str); 30 input = url.openStream(); 31 // int value = 0; 32 33 // while ( (value=input.read())!=-1){ 34 //System.err.print((char)value); 35 //} 36 37 //url = new URL(url_str); 38 //input = url.openStream(); 39 31 40 } 32 41 catch (MalformedURLException e) { 42 33 43 url_valid = false; 34 44 } 35 45 catch (IOException e) { 46 36 47 url_valid = false; 37 48 } … … 71 82 /** Checks that the content of the url is in html */ 72 83 public boolean isHTML() { 73 String content_type = guessContentType(url.toString()); 74 84 85 String content_type = guessContentType(url.toString()); 86 75 87 if(content_type.startsWith("text/html")) { 76 88 return true; … … 144 156 int value = getRaw(); 145 157 if(value != -1) { 158 146 159 if(value == '<') { 147 160 //System.err.println("Parsing a tag starting " + (char)value); … … 151 164 value = getRaw(); 152 165 while(value != -1 && peekRaw() != '<' && value != '>') { 153 //System.err.print ln("Read a " +(char)value);166 //System.err.print((char)value); 154 167 tag = tag + (char) value; 155 168 value = getRaw(); 156 169 } 170 157 171 //System.err.println("Read a " + (char)value); 158 172 //tag = smartLower(tag); 159 tag = findURL(tag); 173 //System.err.println("tag "+tag); 174 tag = findURL(tag); 160 175 buffer = buffer + tag; 161 176 // Add closing > to buffer … … 601 616 } 602 617 } 603 618 619 url_str = url_str.replaceAll("&","&"); 620 604 621 if(state == HREF_FINAL ) { 605 622 try {
Note:
See TracChangeset
for help on using the changeset viewer.