Rizzo now takes in an InputStream instead of a FileInputStream

This commit is contained in:
Wirlaburla 2024-07-21 18:40:54 -05:00
parent acd1f0dfe8
commit 859ac41fde

View File

@ -28,6 +28,7 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.StringWriter; import java.io.StringWriter;
import java.nio.file.Files; import java.nio.file.Files;
@ -59,7 +60,7 @@ public class Rizzo {
private int ver = 1; private int ver = 1;
private String workingDir; private String workingDir;
public Rizzo(FileInputStream infile, String workingDir) throws FileNotFoundException, FirescriptFormatException { public Rizzo(InputStream infile, String workingDir) throws FileNotFoundException, FirescriptFormatException {
if (!workingDir.endsWith("/")) this.workingDir = workingDir + "/"; if (!workingDir.endsWith("/")) this.workingDir = workingDir + "/";
else this.workingDir = workingDir; else this.workingDir = workingDir;
scanner = new Scanner(infile); scanner = new Scanner(infile);