com.ptc.wvs.server.thumbnail.j3d
Class OLFileReader

java.lang.Object
  extended bycom.ptc.wvs.server.thumbnail.j3d.OLFileReader
Direct Known Subclasses:
OL5FileReader, OL6FileReader

public abstract class OLFileReader
extends Object


Field Summary
protected  Hashtable appearanceCache
           
protected  InputStream bi
           
protected static javax.vecmath.Color3f BLACK
           
private  int buff_factor
           
private  boolean byteSwap
           
private  int ch1
           
private  int ch2
           
private  int ch3
           
private  int ch4
           
protected  boolean debug
           
private static byte dol6FILE_ID_BIG_ENDIANb
           
private static byte dol6FILE_ID_BIG_ENDIANB
           
private static byte dol6FILE_ID_BINARYb
           
private static byte dol6FILE_ID_BINARYB
           
private static int dol6FILE_ID_LEN
           
private static String dol6FILE_ID_STR
           
private  float[] extents
           
private  boolean extentsSet
           
protected  PrintWriter extFile
           
protected  File file
           
private static byte OL5_INTEL
           
private static byte OL5_SUN
           
protected  javax.vecmath.Color3f overrideColor
           
protected static PolygonAttributes PA_DOUBLE
           
protected static PolygonAttributes PA_SINGLE
           
private  byte[] read_buffer
           
private  int read_count
           
private  int read_count4
           
private  int read_pos
           
private  int read_size
           
protected  Group scene
           
protected static float SHININESS
           
private  int t1
           
private  int t2
           
protected static javax.vecmath.Color3f WHITE
           
 
Constructor Summary
protected OLFileReader(boolean debug, PrintWriter extFile, File file, InputStream bi, boolean byteSwap)
           
 
Method Summary
protected  int bi_peek1()
           
protected  int bi_peek4()
           
protected  float bi_peekf()
           
protected  void bi_read(byte[] b, int off, int len)
           
protected  int bi_read1()
           
protected  int bi_read4()
           
protected  int bi_read4(InputStream bi)
           
protected  float bi_readf()
           
protected  float bi_readf(InputStream bi)
           
protected  void bi_skip(int s)
           
protected static Appearance createAppearance(Material m, ColoringAttributes ca, boolean doubleSide)
           
protected  Shape3D createShape(javax.vecmath.Color3f diffuse, boolean doubleSide)
           
protected  void decompressDeflateBuffer(byte[] buf)
           
protected  void decompressGZIPFile(byte[] buf)
           
static OLFileReader getOLFileReader(boolean debug, PrintWriter extFile, File file)
           
 Group getScene()
           
protected abstract  boolean read()
           
 boolean readFile()
           
protected  void resetReadBuffer()
           
 void setDebug(boolean b)
           
 void setOverrideColor(String color)
           
protected  void setReadBuffer(byte[] b)
           
protected  void updateExtentsFromXYZ(float x, float y, float z)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OL5_SUN

private static final byte OL5_SUN
See Also:
Constant Field Values

OL5_INTEL

private static final byte OL5_INTEL
See Also:
Constant Field Values

dol6FILE_ID_LEN

private static final int dol6FILE_ID_LEN
See Also:
Constant Field Values

dol6FILE_ID_STR

private static final String dol6FILE_ID_STR
See Also:
Constant Field Values

dol6FILE_ID_BINARYB

private static final byte dol6FILE_ID_BINARYB
See Also:
Constant Field Values

dol6FILE_ID_BINARYb

private static final byte dol6FILE_ID_BINARYb
See Also:
Constant Field Values

dol6FILE_ID_BIG_ENDIANB

private static final byte dol6FILE_ID_BIG_ENDIANB
See Also:
Constant Field Values

dol6FILE_ID_BIG_ENDIANb

private static final byte dol6FILE_ID_BIG_ENDIANb
See Also:
Constant Field Values

scene

protected Group scene

debug

protected boolean debug

file

protected File file

bi

protected InputStream bi

extFile

protected PrintWriter extFile

appearanceCache

protected Hashtable appearanceCache

overrideColor

protected javax.vecmath.Color3f overrideColor

extents

private float[] extents

extentsSet

private boolean extentsSet

BLACK

protected static final javax.vecmath.Color3f BLACK

WHITE

protected static final javax.vecmath.Color3f WHITE

SHININESS

protected static final float SHININESS
See Also:
Constant Field Values

PA_SINGLE

protected static PolygonAttributes PA_SINGLE

PA_DOUBLE

protected static PolygonAttributes PA_DOUBLE

read_buffer

private byte[] read_buffer

read_pos

private int read_pos

read_size

private int read_size

read_count

private int read_count

read_count4

private int read_count4

buff_factor

private int buff_factor

byteSwap

private boolean byteSwap

ch1

private int ch1

ch2

private int ch2

ch3

private int ch3

ch4

private int ch4

t1

private int t1

t2

private int t2
Constructor Detail

OLFileReader

protected OLFileReader(boolean debug,
                       PrintWriter extFile,
                       File file,
                       InputStream bi,
                       boolean byteSwap)
Method Detail

getScene

public Group getScene()

setDebug

public void setDebug(boolean b)

setOverrideColor

public void setOverrideColor(String color)

read

protected abstract boolean read()
                         throws Exception
Throws:
Exception

getOLFileReader

public static OLFileReader getOLFileReader(boolean debug,
                                           PrintWriter extFile,
                                           File file)

readFile

public boolean readFile()

updateExtentsFromXYZ

protected void updateExtentsFromXYZ(float x,
                                    float y,
                                    float z)

createShape

protected Shape3D createShape(javax.vecmath.Color3f diffuse,
                              boolean doubleSide)

createAppearance

protected static Appearance createAppearance(Material m,
                                             ColoringAttributes ca,
                                             boolean doubleSide)

resetReadBuffer

protected void resetReadBuffer()

setReadBuffer

protected void setReadBuffer(byte[] b)
                      throws Exception
Throws:
Exception

decompressGZIPFile

protected void decompressGZIPFile(byte[] buf)
                           throws Exception
Throws:
Exception

decompressDeflateBuffer

protected void decompressDeflateBuffer(byte[] buf)
                                throws Exception
Throws:
Exception

bi_skip

protected void bi_skip(int s)
                throws IOException
Throws:
IOException

bi_read

protected void bi_read(byte[] b,
                       int off,
                       int len)
                throws IOException
Throws:
IOException

bi_peek1

protected int bi_peek1()
                throws IOException
Throws:
IOException

bi_peek4

protected int bi_peek4()
                throws IOException
Throws:
IOException

bi_peekf

protected float bi_peekf()
                  throws IOException
Throws:
IOException

bi_read1

protected int bi_read1()
                throws IOException
Throws:
IOException

bi_read4

protected int bi_read4()
                throws IOException
Throws:
IOException

bi_readf

protected float bi_readf()
                  throws IOException
Throws:
IOException

bi_read4

protected int bi_read4(InputStream bi)
                throws IOException
Throws:
IOException

bi_readf

protected float bi_readf(InputStream bi)
                  throws IOException
Throws:
IOException