Wow I wasn't even close

This commit is contained in:
Adam
2015-10-16 19:26:43 -04:00
parent ad63c9d423
commit 302f0bcfe1
2 changed files with 23 additions and 19 deletions

View File

@@ -488,6 +488,12 @@ public class Index implements Closeable
}
else
{
for (int i = 0; i < filesCount; ++i)
{
File file = a.getFiles().get(i);
stream.writeBytes(file.getContents());
}
for (int count = 0; count < filesCount; ++count)
{
File file = a.getFiles().get(count);
@@ -498,24 +504,22 @@ public class Index implements Closeable
}
int prevLen = 0;
for (int i = 0; i < filesCount; ++i)
{
File file = a.getFiles().get(i);
int len = file.getSize() - prevLen;
//int fid = file.getFileId() - fileId;
//fileId = file.getFileId();
stream.writeInt(len);
prevLen = file.getSize();
stream.writeBytes(file.getContents());
// fileId += stream.readInt();
// System.arraycopy(data, sourceOffset, var18[i], filesSize[i], fileId);
// sourceOffset += fileId;
// filesSize[i] += fileId;
}
// for (int i = 0; i < filesCount; ++i)
// {
// File file = a.getFiles().get(i);
//
// int len = file.getSize() - prevLen;
// //int fid = file.getFileId() - fileId;
// //fileId = file.getFileId();
// stream.writeInt(len);
// prevLen = file.getSize();
//
// // fileId += stream.readInt();
// // System.arraycopy(data, sourceOffset, var18[i], filesSize[i], fileId);
// // sourceOffset += fileId;
// // filesSize[i] += fileId;
// }
stream.writeByte(1); // number of loops
}

View File

@@ -16,7 +16,7 @@ public class StoreTest
@BeforeClass
public static void before()
{
System.setProperty("java.io.tmpdir", "c:/rs/temp");
System.setProperty("java.io.tmpdir", "d:/rs/07/temp/");
}
@Test