import java.net.URL;
import java.net.URLConnection;
public class FileUtils {
<BUG>public static CountingReader readerFor(String fileName) throws IOException {
if (fileName==null) return null;
if (fileName.startsWith("http") || fileName.startsWith("file:")) {
</BUG>
URL url = new URL(fileName);
URLConnection conn = url.openConnection();
long size = conn.getContentLengthLong();

import java.net.URL;
import java.net.URLConnection;
public class FileUtils {
public static CountingReader readerFor(String fileName) throws IOException {
checkReadAllowed(fileName);
if (fileName==null) return null;
if (fileName.toLowerCase().startsWith("http") || fileName.toLowerCase().startsWith("file:")) {
URL url = new URL(fileName);
URLConnection conn = url.openConnection();
long size = conn.getContentLengthLong();
