
public class ReaderUtils extends Object
| Constructor and Description |
|---|
ReaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
deflateGzip(byte[] inputBytes)
Deflate a gzip byte array.
|
static byte[] |
getByteArrayFromUrl(String pdbCode)
Get the GZIP compressed and messagepack serialized data from the MMTF servers
|
static MmtfStructure |
getDataFromFile(Path filePath)
A function to get MMTF data from a file path.
|
static MmtfStructure |
getDataFromUrl(String pdbCode)
Find the message pack byte array from the web using the input code and a base url.
|
public static MmtfStructure getDataFromUrl(String pdbCode) throws IOException
pdbCode - the pdb code for the desired structure.IOException - if the data cannot be read from the URLpublic static byte[] getByteArrayFromUrl(String pdbCode) throws IOException
pdbCode - the PDB code for the data requiredIOException - an error reading the URLpublic static byte[] deflateGzip(byte[] inputBytes)
throws IOException
inputBytes - a gzip compressed byte arrayIOException - error in gzip input streampublic static MmtfStructure getDataFromFile(Path filePath) throws IOException
filePath - the full path of the file to be readMmtfStructureIOException - an error reading the fileCopyright © 2015–2016 RCSB PDB. All rights reserved.