final String resource = u.getPath();
return new URLConnection(u) {
public void connect() {
}
public String getContentType() {
FileNameMap fileNameMap = java.net.URLConnection.getFileNameMap();
String contentType = fileNameMap.getContentTypeFor(resource);
if (contentType == null)
contentType = "text/plain";
return contentType;
}
public InputStream getInputStream() throws IOException {