eclair snapshot

This commit is contained in:
Jean-Baptiste Queru
2009-11-12 18:45:53 -08:00
parent 6c63ee4fc4
commit 9db3d07b96
3587 changed files with 991748 additions and 69172 deletions

View File

@@ -32,13 +32,14 @@ import java.io.RandomAccessFile;
class RandomBlock {
private static final String TAG = "RandomBlock";
private static final boolean DEBUG = false;
private static final int BLOCK_SIZE = 4096;
private byte[] block = new byte[BLOCK_SIZE];
private RandomBlock() { }
static RandomBlock fromFile(String filename) throws IOException {
Log.v(TAG, "reading from file " + filename);
if (DEBUG) Log.v(TAG, "reading from file " + filename);
InputStream stream = null;
try {
stream = new FileInputStream(filename);
@@ -62,7 +63,7 @@ class RandomBlock {
}
void toFile(String filename) throws IOException {
Log.v(TAG, "writing to file " + filename);
if (DEBUG) Log.v(TAG, "writing to file " + filename);
RandomAccessFile out = null;
try {
out = new RandomAccessFile(filename, "rws");