class LWOBFileReader
extends java.io.BufferedInputStream
| Modifier and Type | Field and Description |
|---|---|
protected DebugOutput |
debugPrinter |
(package private) static int |
EXCEPTION |
(package private) static int |
LINE_TRACE |
protected int |
marker |
(package private) static int |
MISC |
(package private) static int |
NONE |
protected java.lang.String |
theFilename |
(package private) static int |
TRACE |
(package private) static int |
VALUES |
| Constructor and Description |
|---|
LWOBFileReader(java.lang.String filename)
Constructor.
|
LWOBFileReader(java.net.URL url) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
debugOutputLn(int outputType,
java.lang.String theOutput) |
java.lang.String |
getFilename()
Returns the name of the file associated with this stream
|
float |
getFloat()
Read four bytes from the file and return their float value
|
int |
getInt()
Read four bytes from the file and return their integer value
|
int |
getMarker()
Returns the current position in the file
|
int |
getShortInt()
Reads two bytes from the file and returns their integer value.
|
java.lang.String |
getString()
Returns a string read from the file.
|
java.lang.String |
getToken() |
void |
getVerts(float[] ar,
int num)
Reads an array of xyz values.
|
int |
read() |
int |
read(byte[] buffer,
int offset,
int count) |
void |
skipLength(int amount)
Skip ahead amount bytes in the file
|
static final int TRACE
static final int VALUES
static final int MISC
static final int LINE_TRACE
static final int NONE
static final int EXCEPTION
protected DebugOutput debugPrinter
protected java.lang.String theFilename
protected int marker
public LWOBFileReader(java.lang.String filename)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic LWOBFileReader(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionprotected void debugOutputLn(int outputType,
java.lang.String theOutput)
public java.lang.String getToken()
throws ParsingErrorException
ParsingErrorExceptionpublic void skipLength(int amount)
throws ParsingErrorException
ParsingErrorExceptionpublic int getInt()
throws ParsingErrorException
ParsingErrorExceptionpublic float getFloat()
throws ParsingErrorException
ParsingErrorExceptionpublic java.lang.String getFilename()
public java.lang.String getString()
throws ParsingErrorException
ParsingErrorExceptionpublic void getVerts(float[] ar,
int num)
throws ParsingErrorException
ParsingErrorExceptionpublic int getShortInt()
throws ParsingErrorException
ParsingErrorExceptionpublic int getMarker()
public int read()
throws java.io.IOException
read in class java.io.BufferedInputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int count)
throws java.io.IOException
read in class java.io.BufferedInputStreamjava.io.IOExceptionCopyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.