Memory input stream (Simplified version of ReReadableInputStream, which accepts byte array)

This commit is contained in:
Honfika
2013-11-30 16:00:51 +01:00
parent 2af979dbd9
commit ab569f1dd2
18 changed files with 395 additions and 299 deletions

View File

@@ -29,7 +29,7 @@ import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame;
import com.jpexs.helpers.Cache;
import com.jpexs.helpers.Helper;
import com.jpexs.helpers.ProgressListener;
import com.jpexs.helpers.ReReadableInputStream;
import com.jpexs.helpers.streams.SeekableInputStream;
import com.jpexs.helpers.utf8.Utf8PrintWriter;
import com.sun.jna.Platform;
import java.awt.*;
@@ -313,9 +313,9 @@ public class Main {
} else {
if (inputStream instanceof FileInputStream) {
openFile(file);
} else if (inputStream instanceof ReReadableInputStream) {
} else if (inputStream instanceof SeekableInputStream) {
try {
((ReReadableInputStream) inputStream).setPos(0);
((SeekableInputStream) inputStream).seek(0);
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}