diff options
Diffstat (limited to 'src/demos/util/ObjReader.java')
-rw-r--r-- | src/demos/util/ObjReader.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/demos/util/ObjReader.java b/src/demos/util/ObjReader.java index 382a658..10882f0 100644 --- a/src/demos/util/ObjReader.java +++ b/src/demos/util/ObjReader.java @@ -68,8 +68,16 @@ public class ObjReader { this(new File(filename)); } + public ObjReader(InputStream in) throws IOException { + this(new InputStreamReader(in)); + } + public ObjReader(File file) throws IOException { - BufferedReader reader = new BufferedReader(new FileReader(file)); + this (new FileReader(file)); + } + + public ObjReader(Reader r) throws IOException { + BufferedReader reader = new BufferedReader(r); String line = null; int lineNo = 0; float[] floatTmp = new float[3]; |