public ReferenceList(Representation uriList) throws IOException { BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(uriList.getStream()));  String line = br.readLine();   if ((line != null) && line.startsWith("#")) { setListRef(new Reference(line.substring(1).trim())); line = br.readLine(); }  while (line != null) { if (!line.startsWith("#")) { add(new Reference(line.trim())); }  line = br.readLine(); } } finally { if (br != null) { br.close(); } }
public ReferenceList() { super();
    public ReferenceList(Representation uriList) throws IOException {        BufferedReader br = null;        try {            br = new BufferedReader(new InputStreamReader(uriList.getStream()));            String line = br.readLine();            // Check if the list reference is specified as the first comment            if ((line != null) && line.startsWith("#")) {                setListRef(new Reference(line.substring(1).trim()));                line = br.readLine();            }            while (line != null) {                if (!line.startsWith("#")) {                    add(new Reference(line.trim()));                }                line = br.readLine();            }        } finally {            if (br != null) {                br.close();            }        }    }