ReaderUtils { public static MmtfStructure getDataFromFile(Path filePath) throws IOException { try (InputStream is = new ByteArrayInputStream(readFile(filePath))) { return getDataFromInputStream(is); } }  static MmtfStructure getDataFromUrl(String pdbId); static MmtfStructure getDataFromUrl(String pdbId, boolean https, boolean reduced); static byte[] getByteArrayFromUrl(String pdbId); static byte[] getByteArrayFromUrl(String pdbId, boolean https, boolean reduced); static byte[] deflateGzip(byte[] inputBytes); static MmtfStructure getDataFromFile(Path filePath); static MmtfStructure getDataFromInputStream(InputStream inStream);  }
@Test public void testReadFromFile() throws IOException, ParseException { ClassLoader classLoader = getClass().getClassLoader(); MmtfStructure mmtfBean = ReaderUtils.getDataFromFile(Utils.getResource("/mmtf/4CUP.mmtf")); assertNotEquals(mmtfBean, null); assertEquals(mmtfBean.getDepositionDate(), "2014-03-21"); assertEquals(mmtfBean.getNumAtoms(), 1107); assertEquals(mmtfBean.getNumBonds(), 978); }