public class ReaderUtils
extends java.lang.Object
| Constructor and Description |
|---|
ReaderUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
deflateGzip(byte[] inputBytes)
Deflate a gzip byte array.
|
static byte[] |
getByteArrayFromUrl(java.lang.String pdbId)
Gets the GZIP compressed and messagepack serialized data from the MMTF servers
|
static byte[] |
getByteArrayFromUrl(java.lang.String pdbId,
boolean https,
boolean reduced)
Gets the GZIP compressed and messagepack serialized data from the MMTF servers.
|
static MmtfStructure |
getDataFromFile(java.nio.file.Path filePath)
Reads and deserializes an uncompressed MMTF file.
|
static MmtfStructure |
getDataFromInputStream(java.io.InputStream inStream)
Read an input stream to an
MmtfStructure object. |
static MmtfStructure |
getDataFromUrl(java.lang.String pdbId)
Returns a full (atom atom) MmmtfStructure given a PDB Id from the MMTF web server using HTTP.
|
static MmtfStructure |
getDataFromUrl(java.lang.String pdbId,
boolean https,
boolean reduced)
Returns an MmmtfStructure given a PDB Id from the MMTF web server.
|
public static MmtfStructure getDataFromUrl(java.lang.String pdbId) throws java.io.IOException
pdbId - the pdb code for the desired structure.java.io.IOException - if the data cannot be read from the URLpublic static MmtfStructure getDataFromUrl(java.lang.String pdbId, boolean https, boolean reduced) throws java.io.IOException
pdbId - the pdb code for the desired structure.java.io.IOException - if the data cannot be read from the URLpublic static byte[] getByteArrayFromUrl(java.lang.String pdbId)
throws java.io.IOException
pdbId - the PDB code for the data requiredjava.io.IOException - an error reading the URLpublic static byte[] getByteArrayFromUrl(java.lang.String pdbId,
boolean https,
boolean reduced)
throws java.io.IOException
pdbId - the PDB Id to retrievejava.io.IOException - an error reading the URLpublic static byte[] deflateGzip(byte[] inputBytes)
throws java.io.IOException
inputBytes - a gzip compressed byte arrayjava.io.IOException - error in gzip input streampublic static MmtfStructure getDataFromFile(java.nio.file.Path filePath) throws java.io.IOException
filePath - the full path of the file to be readMmtfStructurejava.io.IOException - an error reading the filepublic static MmtfStructure getDataFromInputStream(java.io.InputStream inStream) throws java.io.IOException
MmtfStructure object.inStream - the InputStream to read.MmtfStructure to be returnedjava.io.IOException - if the inStream cannot be readCopyright © 2015-2019 RCSB PDB. All Rights Reserved.