我希望能够使用 apache httpclient 访问自定义 URL。像这样的东西:
HttpClient client = new HttpClient();
HttpMethod method = new GetMethod("media:///squishy.jpg");
int statusCode = client.executeMethod(method);
我可以以某种方式注册自定义 URL 处理程序吗?或者我应该只用Java注册一个,使用
URL.setURLStreamHandlerFactory(...)
问候。