is = new FileInputStream(file);
} else {
URLConnection uc = url.openConnection();
is = uc.getInputStream();
if(convertToString) {
ParsedContentType pct = new ParsedContentType(uc.getContentType());
contentType = pct.getContentType();
encoding = pct.getEncoding();
}
else {
contentType = encoding = null;
}
capacityHint = uc.getContentLength();