/** * {@inheritDoc} */ public Collection<BinaryInteraction> read(Reader reader) throws IOException, PsimiTabException { BufferedReader bufferedReader = null; Collection<BinaryInteraction> interactions; try { bufferedReader = new BufferedReader(reader); interactions = read(bufferedReader); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedReader != null) { bufferedReader.close(); } } return interactions; }
/** * {@inheritDoc} */ public Collection<BinaryInteraction> read(InputStream is) throws IOException, PsimiTabException { BufferedReader bufferedReader = null; Collection<BinaryInteraction> interactions; try { bufferedReader = new BufferedReader(new InputStreamReader(is)); interactions = read(bufferedReader); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedReader != null) { bufferedReader.close(); } } return interactions; }
public Collection<BinaryInteraction> getBinaryInteractionList() throws PsimiTabException, IOException { return mitabReader.read(getMitab()); }
/** * {@inheritDoc} */ public Collection<BinaryInteraction> read(File file) throws IOException, PsimiTabException { FileReader reader = null; BufferedReader bufferedReader = null; Collection<BinaryInteraction> interactions; try { reader = new FileReader(file); bufferedReader = new BufferedReader(reader); interactions = read(bufferedReader); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedReader != null) { bufferedReader.close(); } if (reader != null) { reader.close(); } } return interactions; }
/** * {@inheritDoc} */ public Collection<BinaryInteraction> read(String s) throws IOException, PsimiTabException { ByteArrayInputStream is = null; BufferedReader bufferedReader = null; Collection<BinaryInteraction> interactions; try { is = new ByteArrayInputStream(s.getBytes()); bufferedReader = new BufferedReader(new InputStreamReader(is)); interactions = read(bufferedReader); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedReader != null) { bufferedReader.close(); } if (is != null) { is.close(); } } return interactions; }
/** * {@inheritDoc} */ public Collection<BinaryInteraction> read(URL url) throws IOException, PsimiTabException { InputStream is = null; BufferedReader bufferedReader = null; Collection<BinaryInteraction> interactions; try { is = url.openStream(); bufferedReader = new BufferedReader(new InputStreamReader(is)); interactions = read(bufferedReader); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedReader != null) { bufferedReader.close(); } if (is != null) { is.close(); } } return interactions; }
log.debug("Reading " + inputFile.getAbsolutePath()); all.addAll(reader.read(inputFile));
log.debug("Reading " + inputFile.getAbsolutePath()); all.addAll(reader.read(inputFile));
Collection<BinaryInteraction> interactions = reader.read(inputStream); Tab2Xml tab2Xml = new Tab2Xml(); EntrySet entrySet;