Backup save of archive loading

This commit is contained in:
Adam
2015-10-13 17:04:18 -04:00
parent a557663044
commit 92faf3fa48
16 changed files with 1884 additions and 6 deletions

View File

@@ -20,8 +20,8 @@ public class DataFileTest
Store store = new Store(folder.getRoot());
DataFile df = new DataFile(store, file);
int sector = df.write(42, 3, ByteBuffer.wrap("test".getBytes()));
ByteBuffer buf = df.read(42, 3, sector, 4);
String str = new String(buf.array());
byte[] buf = df.read(42, 3, sector, 4);
String str = new String(buf);
Assert.assertEquals("test", str);
file.delete();
}
@@ -36,8 +36,8 @@ public class DataFileTest
Store store = new Store(folder.getRoot());
DataFile df = new DataFile(store, file);
int sector = df.write(42, 0x1FFFF, ByteBuffer.wrap(b));
ByteBuffer buf = df.read(42, 0x1FFFF, sector, b.length);
Assert.assertArrayEquals(b, buf.array());
byte[] buf = df.read(42, 0x1FFFF, sector, b.length);
Assert.assertArrayEquals(b, buf);
file.delete();
}
}