1 21 24 package org.lobobrowser.util; 25 26 import java.io.IOException ; 27 import java.io.InputStream ; 28 import java.net.URLConnection ; 29 import java.util.Collections ; 30 import java.util.Map ; 31 32 35 public class GenericURLConnection extends URLConnection { 36 private final java.io.InputStream inputStream; 37 38 41 public GenericURLConnection(java.net.URL url, InputStream in) { 42 super(url); 43 this.inputStream = in; 44 } 45 46 49 public void connect() throws IOException { 50 } 51 52 53 56 public InputStream getInputStream() throws IOException { 57 return this.inputStream; 58 } 59 60 63 public String getHeaderField(int n) { 64 return null; 65 } 66 67 70 public String getHeaderField(String name) { 71 return null; 72 } 73 74 77 public String getHeaderFieldKey(int n) { 78 return null; 79 } 80 81 84 public Map getHeaderFields() { 85 return Collections.EMPTY_MAP; 86 } 87 } 88 89 | Popular Tags |