mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-12 18:18:34 +00:00
Added #1864 Commandline: Allow to set special value "/dev/stdin" for input files to read from stdin (even on Windows)
This commit is contained in:
@@ -116,6 +116,7 @@ import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
import java.lang.reflect.Array;
|
||||
@@ -208,11 +209,11 @@ public class SwfXmlImporter {
|
||||
return cls != null && (cls.isArray() || List.class.isAssignableFrom(cls));
|
||||
}
|
||||
|
||||
public void importSwf(SWF swf, File inFile) throws IOException {
|
||||
public void importSwf(SWF swf, InputStream in) throws IOException {
|
||||
XMLInputFactory xmlFactory = XMLInputFactory.newInstance();
|
||||
|
||||
try {
|
||||
try(Reader reader = new Utf8InputStreamReader(new BufferedInputStream(new FileInputStream(inFile)))) {
|
||||
try(Reader reader = new Utf8InputStreamReader(new BufferedInputStream(in))) {
|
||||
XMLStreamReader xmlReader = xmlFactory.createXMLStreamReader(reader);
|
||||
|
||||
xmlReader.nextTag();
|
||||
|
||||
Reference in New Issue
Block a user