net.sf.j3d.threeD.io
Class FileEncoder

java.lang.Object
  extended by net.sf.j3d.threeD.io.FileEncoder

public class FileEncoder
extends Object

The FileEncoder class provides static methods for encoding Scene and Surface objects and storing them in local files.


Field Summary
static int GTSEncoding
          The integer code for a GTS encoding.
static int JPEGEncoding
          The integer code for a JPEG image encoding.
static int PIXEncoding
          The integer code for a PIX image encoding.
static int PPMEncoding
          The integer code for a PPM image encoding.
static int RGBListEncoding
          The integer code for an RGB list image encoding.
static int XMLEncoding
          The integer code for an XML encoding.
 
Constructor Summary
FileEncoder()
           
 
Method Summary
static void encodeImageFile(RGB[][] image, File file, int encoding)
          Encodes the image represented by the specified RGB array using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object.
static void encodeSceneFile(Scene scene, File file, int encoding)
          Encodes the specified Scene object using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object.
static void encodeSurfaceFile(Surface surface, File file, int encoding)
          Encodes the specified Surface object using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object.
static void writeImage(RGB[][] image, OutputStream o, int encoding)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLEncoding

public static final int XMLEncoding
The integer code for an XML encoding.

See Also:
Constant Field Values

GTSEncoding

public static final int GTSEncoding
The integer code for a GTS encoding.

See Also:
Constant Field Values

PPMEncoding

public static final int PPMEncoding
The integer code for a PPM image encoding.

See Also:
Constant Field Values

PIXEncoding

public static final int PIXEncoding
The integer code for a PIX image encoding.

See Also:
Constant Field Values

JPEGEncoding

public static final int JPEGEncoding
The integer code for a JPEG image encoding.

See Also:
Constant Field Values

RGBListEncoding

public static final int RGBListEncoding
The integer code for an RGB list image encoding.

See Also:
Constant Field Values
Constructor Detail

FileEncoder

public FileEncoder()
Method Detail

encodeSceneFile

public static void encodeSceneFile(Scene scene,
                                   File file,
                                   int encoding)
                            throws IOException
Encodes the specified Scene object using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object. If the encoding code is not recognized, the method returns.

Throws:
IOException

encodeSurfaceFile

public static void encodeSurfaceFile(Surface surface,
                                     File file,
                                     int encoding)
                              throws IOException
Encodes the specified Surface object using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object. If the encoding code is not recognized, the method returns.

Throws:
IOException

encodeImageFile

public static void encodeImageFile(RGB[][] image,
                                   File file,
                                   int encoding)
                            throws IOException
Encodes the image represented by the specified RGB array using the encoding specified by the integer encoding code and saves the encoded data in the file represented by the specified File object. If the encoding code is not recognized, the method returns.

Throws:
IOException

writeImage

public static void writeImage(RGB[][] image,
                              OutputStream o,
                              int encoding)
                       throws IOException
Throws:
IOException