1 38 package com.gargoylesoftware.htmlunit.protocol.javascript; 39 40 import java.io.InputStream ; 41 import java.net.URL ; 42 import java.net.URLConnection ; 43 44 import com.gargoylesoftware.htmlunit.TextUtil; 45 46 52 public class JavaScriptURLConnection extends URLConnection { 53 private final String content_; 54 55 56 60 public JavaScriptURLConnection( final URL newUrl ) { 61 super(newUrl); 62 63 content_ = newUrl.toExternalForm().substring("javascript:".length()); 64 } 65 66 67 70 public void connect() { 71 } 72 73 74 78 public InputStream getInputStream() { 79 return TextUtil.toInputStream(content_); 80 } 81 } 82 | Popular Tags |