diff --git a/mmtf-codec/src/main/java/org/rcsb/mmtf/decoder/ReaderUtils.java b/mmtf-codec/src/main/java/org/rcsb/mmtf/decoder/ReaderUtils.java index 10ddb3c..fccb05c 100644 --- a/mmtf-codec/src/main/java/org/rcsb/mmtf/decoder/ReaderUtils.java +++ b/mmtf-codec/src/main/java/org/rcsb/mmtf/decoder/ReaderUtils.java @@ -102,19 +102,8 @@ public static byte[] deflateGzip(byte[] inputBytes) throws IOException { * @throws IOException an error reading the file */ public static MmtfStructure getDataFromFile(Path filePath) throws IOException { - // Now return the gzip deflated and deserialized byte array - return getDataFromInputStream(new ByteArrayInputStream(readFile(filePath))); - } - /** - * Read a byte array from a file - * @param path the input file path - * @return the returned byte array - * @throws IOException an error reading the file - */ - private static byte[] readFile(Path path) throws IOException { - byte[] data = Files.readAllBytes(path); - return data; + return getDataFromInputStream(Files.newInputStream(filePath)); } /**