Class MmtfActions
java.lang.Object
org.biojava.nbio.structure.io.mmtf.MmtfActions
A class of functions for reading and writing Biojava structures using MMTF
- Author:
- Anthony Bradley
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Structure
readFromFile
(Path filePath) Get a Structure object from a mmtf file.static Structure
readFromInputStream
(InputStream inStream) Read a Biojava structure from anInputStream
static void
writeToFile
(Structure structure, Path path) Write a Structure object to a file.static void
writeToOutputStream
(Structure structure, OutputStream outputStream) Write a Structure object to anOutputStream
-
Constructor Details
-
MmtfActions
public MmtfActions()
-
-
Method Details
-
readFromFile
Get a Structure object from a mmtf file.- Parameters:
filePath
- the mmtf file- Returns:
- a Structure object relating to the input byte array.
- Throws:
IOException
-
writeToFile
Write a Structure object to a file.- Parameters:
structure
- the Structure to writepath
- the file to write- Throws:
IOException
-
writeToOutputStream
public static void writeToOutputStream(Structure structure, OutputStream outputStream) throws IOException Write a Structure object to anOutputStream
- Parameters:
structure
- the Structure to writeoutputStream
- theOutputStream
to write to- Throws:
IOException
- an error transferring the byte[]
-
readFromInputStream
Read a Biojava structure from anInputStream
- Parameters:
inStream
- theInputStream
to read from- Returns:
- the parsed
Structure
- Throws:
IOException
-