1 28 29 package com.caucho.vfs; 30 31 import java.io.FileNotFoundException ; 32 import java.io.IOException ; 33 import java.util.Map ; 34 35 42 public class NotFoundPath extends Path { 43 private String _url; 44 45 48 public NotFoundPath(String url) 49 { 50 super(null); 51 52 _url = url; 53 _schemeMap = SchemeMap.getNullSchemeMap(); 54 } 55 56 59 public Path schemeWalk(String userPath, 60 Map <String ,Object > attributes, 61 String path, int offset) 62 { 63 return this; 64 } 65 66 69 public String getURL() 70 { 71 return "error:" + _url; 72 } 73 74 public String getScheme() 75 { 76 return "error"; 77 } 78 79 82 public String getPath() 83 { 84 return _url; 85 } 86 87 90 public Path lookupImpl(String userPath, Map <String ,Object > newAttributes) 91 { 92 return this; 93 } 94 95 98 public StreamImpl openReadImpl() 99 throws IOException 100 { 101 throw new FileNotFoundException (_url); 102 } 103 104 protected Path copyCache() 105 { 106 return null; 107 } 108 } 109 | Popular Tags |