1 28 29 package com.caucho.vfs.memory; 30 31 import com.caucho.vfs.Vfs; 32 33 import java.io.IOException ; 34 import java.io.InputStream ; 35 import java.io.OutputStream ; 36 import java.net.URL ; 37 import java.net.URLConnection ; 38 39 42 class MemoryURLConnection extends URLConnection { 43 MemoryURLConnection(URL url) 44 { 45 super(url); 46 } 47 48 public void connect() 49 { 50 } 51 52 public InputStream getInputStream() 53 throws IOException 54 { 55 return Vfs.lookup().lookup(url.toString()).openRead(); 56 } 57 58 public OutputStream getOutputStream() 59 throws IOException 60 { 61 return Vfs.lookup().lookup(url.toString()).openWrite(); 62 } 63 } 64 | Popular Tags |