
public class WriterUtils extends Object
| Constructor and Description |
|---|
WriterUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getDataAsByteArr(AdapterToStructureData writerToEncoder)
Function to take data from a writer and return as a byte array (MessagePacked serialized).
|
static byte[] |
gzipCompress(byte[] byteArray)
Compress a byte array using Gzip.
|
static void |
writeDataToFile(AdapterToStructureData writerToEncoder,
Path path)
Function to write data to a file.
|
public static void writeDataToFile(AdapterToStructureData writerToEncoder, Path path) throws IOException
writerToEncoder - the writer to encoder instancepath - the full path to write toIOException - an error related to byte array transferspublic static byte[] getDataAsByteArr(AdapterToStructureData writerToEncoder) throws IOException
writerToEncoder - the writer to encoder instanceIOException - an error related to byte array transferspublic static byte[] gzipCompress(byte[] byteArray)
throws IOException
byteArray - the input byte arrayIOException - an exception creating the GZIP streamCopyright © 2015–2016 RCSB PDB. All rights reserved.