Package psidev.psi.mi.jami.commons
Class MIFileUtils
- java.lang.Object
-
- psidev.psi.mi.jami.commons.MIFileUtils
-
public class MIFileUtils extends Object
Utility class for Molecular interaction datasources- Since:
26/03/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description MIFileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static File
storeAsTemporaryFile(InputStream is, String name, String extension)
Store the content of the given input stream into a temporary file and return its descriptor.static File
storeAsTemporaryFile(Reader reader, String name, String extension)
Store the content of the given reader into a temporary file and return its descriptor.
-
-
-
Method Detail
-
storeAsTemporaryFile
public static File storeAsTemporaryFile(InputStream is, String name, String extension) throws IOException
Store the content of the given input stream into a temporary file and return its descriptor. It will not close the given input stream.- Parameters:
is
- the input stream to store.name
- aString
object.extension
- aString
object.- Returns:
- a File descriptor describing a temporary file storing the content of the given input stream.
- Throws:
IOException
- if an IO error occur.
-
storeAsTemporaryFile
public static File storeAsTemporaryFile(Reader reader, String name, String extension) throws IOException
Store the content of the given reader into a temporary file and return its descriptor. It will not close the given reader.- Parameters:
reader
- the reader to use.name
- aString
object.extension
- aString
object.- Returns:
- a File descriptor describing a temporary file storing the content of the given input stream.
- Throws:
IOException
- if an IO error occur.
-
-