@Test public void testCorruptedFileThrows() throws Exception { try (FileOutputStream fos = new FileOutputStream(file)) { fos.write(new byte[] {0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 127}); fos.flush(); } try { loader.get(file); fail(); } catch (RuntimeException e) { assertTrue(e.getCause().getCause() instanceof ChronicleHashRecoveryFailedException); } }
public ChronicleMap<K, V> get(File f) throws Exception { Preconditions.checkNotNull(f); return maps.get(f); }
MapLoader { public ChronicleMap<K, V> get(File f) throws Exception { Preconditions.checkNotNull(f); return maps.get(f); } }
MapLoader { public ChronicleMap<K, V> get(File f) throws Exception { Preconditions.checkNotNull(f); return maps.get(f); } MapLoader(Class<K> keyClass,
                   Class<V> valueClass,
                   long entries,
                   double avgKeySize,
                   double avgValueSize,
                   KM keyMarshaller,
                   VM valueMarshaller,
                   boolean doPersist); }
MapLoader { public ChronicleMap<K, V> get(File f) throws Exception { Preconditions.checkNotNull(f); return maps.get(f); } MapLoader(Class<K> keyClass,
                   Class<V> valueClass,
                   long entries,
                   double avgKeySize,
                   double avgValueSize,
                   KM keyMarshaller,
                   VM valueMarshaller,
                   boolean doPersist); ChronicleMap<K, V> get(File f); @Override String toString(); }
MapLoader { public ChronicleMap<K, V> get(File f) throws Exception { Preconditions.checkNotNull(f); return maps.get(f); } MapLoader(Class<K> keyClass,
                   Class<V> valueClass,
                   long entries,
                   double avgKeySize,
                   double avgValueSize,
                   KM keyMarshaller,
                   VM valueMarshaller,
                   boolean doPersist); ChronicleMap<K, V> get(File f); @Override String toString();  }