diff options
author | Kenneth Russel <[email protected]> | 2005-05-23 19:04:47 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-05-23 19:04:47 +0000 |
commit | 5c3a81ed64b3fa37dd5010297bc805368ca1fb7c (patch) | |
tree | 3e6a17c4f5b923206731746c11ad3a97bffffb59 /src/demos/util/ObjReader.java | |
parent | 07ebb8442b61c1e016936546ce804194c5ebd943 (diff) |
Added constructor taking InputStream
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@78 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
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]; |