refactor move utils

This commit is contained in:
Adam
2015-10-17 14:12:04 -04:00
parent c36ff0c5bd
commit 7c7de16025
8 changed files with 11 additions and 27 deletions

View File

@@ -9,8 +9,8 @@ import java.nio.ByteBuffer;
import java.util.Objects;
import net.runelite.cache.fs.io.InputStream;
import net.runelite.cache.fs.io.OutputStream;
import net.runelite.cache.fs.util.bzip2.BZip2Decompressor;
import net.runelite.cache.fs.util.gzip.GZipDecompressor;
import net.runelite.cache.fs.util.BZip2Decompressor;
import net.runelite.cache.fs.util.GZipDecompressor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@@ -9,8 +9,8 @@ import java.util.List;
import java.util.Objects;
import net.runelite.cache.fs.io.InputStream;
import net.runelite.cache.fs.io.OutputStream;
import net.runelite.cache.fs.util.bzip2.BZip2Decompressor;
import net.runelite.cache.fs.util.gzip.GZipDecompressor;
import net.runelite.cache.fs.util.BZip2Decompressor;
import net.runelite.cache.fs.util.GZipDecompressor;
public class Index implements Closeable
{
@@ -133,22 +133,6 @@ public class Index implements Closeable
index255.write(new IndexEntry(index255, id, res.sector, res.compressedLength));
}
private void checkRevision(InputStream stream, int compressedLength)
{
int offset = stream.getOffset();
if (stream.getLength() - (compressedLength + stream.getOffset()) >= 2)
{
stream.setOffset(stream.getLength() - 2);
this.revision = stream.readUnsignedShort();
stream.setOffset(offset);
}
else
{
this.revision = -1;
}
}
private void readIndexData(byte[] data)
{
InputStream stream = new InputStream(data);

View File

@@ -1,4 +1,4 @@
package net.runelite.cache.fs.util.bzip2;
package net.runelite.cache.fs.util;
public class BZip2BlockEntry {
boolean[] aBooleanArray2205 = new boolean[16];

View File

@@ -1,6 +1,6 @@
package net.runelite.cache.fs.util.bzip2;
package net.runelite.cache.fs.util;
import net.runelite.cache.fs.util.bzip2.BZip2BlockEntry;
import net.runelite.cache.fs.util.BZip2BlockEntry;
public class BZip2Decompressor {
private static int[] anIntArray257;

View File

@@ -1,4 +1,4 @@
package net.runelite.cache.fs.util.crc32;
package net.runelite.cache.fs.util;
import java.util.zip.CRC32;

View File

@@ -1,4 +1,4 @@
package net.runelite.cache.fs.util.gzip;
package net.runelite.cache.fs.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@@ -1,4 +1,4 @@
package net.runelite.cache.fs.util.gzip;
package net.runelite.cache.fs.util;
import net.runelite.cache.fs.io.Stream;
import java.util.zip.Inflater;

View File

@@ -5,7 +5,7 @@ import org.junit.Test;
public class StoreLoadTest
{
@Test
//@Test
public void test() throws IOException
{
Store store = new Store(new java.io.File("d:/rs/07/cache"));//c:/rs/cache"));