Searching in browsers cache (Chrome, Firefox)

This commit is contained in:
Jindra Petk
2013-09-09 21:48:38 +02:00
parent 97385bd634
commit ca8f9b9e1a
38 changed files with 1961 additions and 19 deletions

View File

@@ -0,0 +1,32 @@
package com.jpexs.browsers.cache;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author JPEXS
*/
public class RafInputStream extends InputStream {
private RandomAccessFile raf;
private long pos = 0;
public RafInputStream(RandomAccessFile raf) {
this.raf = raf;
try {
pos = raf.getFilePointer();
} catch (IOException ex) {
Logger.getLogger(RafInputStream.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
public int read() throws IOException {
raf.seek(pos++);
return raf.read();
}
}