diff options
Diffstat (limited to 'src/demos/util/ObjReader.java')
-rw-r--r-- | src/demos/util/ObjReader.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/demos/util/ObjReader.java b/src/demos/util/ObjReader.java index 382a658..f8a6cec 100644 --- a/src/demos/util/ObjReader.java +++ b/src/demos/util/ObjReader.java @@ -20,7 +20,7 @@ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN - * MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR @@ -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]; |