mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 20:31:01 +00:00
binary file search fixed
This commit is contained in:
@@ -29,10 +29,10 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class StreamSearch implements Searchable {
|
||||
|
||||
private final ReReadableInputStream is;
|
||||
private final MemoryInputStream is;
|
||||
|
||||
public StreamSearch(InputStream is) {
|
||||
this.is = new ReReadableInputStream(is);
|
||||
this.is = new MemoryInputStream(Helper.readStream(is));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -83,7 +83,8 @@ public class StreamSearch implements Searchable {
|
||||
}
|
||||
}
|
||||
if (match) {
|
||||
InputStream fis = new FoundInputStream(pos + i, is);
|
||||
// todo: support > 2GB files
|
||||
InputStream fis = new MemoryInputStream(is.getAllRead(), (int) pos + i);
|
||||
ret.put(pos + i, fis);
|
||||
continue loopdata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user