Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.j3d.threeD.io
Class FileDecoder

    java.lang.Object
      net.sf.j3d.threeD.io.FileDecoder

    public class FileDecoder

extends Object

The FileDecoder class provides static methods for decoding scene and surface data that has been stored in a file.

Field Summary
`static int` | `GTSEncoding` The integer code for a GTS encoding.
`static int` | `PLYEncoding` The integer code for a ply encoding.
`static int` | `RAWEncoding` The integer code for a RAW encoding.
`static int` | `RGBListEncoding` The integer code for a RGB list encoding.
`static int` | `XMLEncoding` The integer code for an XML encoding.

Constructor Summary
`FileDecoder()`

Method Summary
`static Scene` | `decodeScene(InputStream fileIn, int encoding, boolean ui, ExceptionListener listener)`
`static Scene` | `decodeScene(InputStream fileIn, int encoding, boolean ui, ExceptionListener listener, Surface s)` Decodes the scene data read from the specified InputStream object using the encoding specified by the integer encoding code and returnes the new Scene object.
`static Scene` | `decodeSceneFile(File file, int encoding, boolean ui, ExceptionListener listener)`
`static Scene` | `decodeSceneFile(File file, int encoding, boolean ui, ExceptionListener listener, Surface s)` Decodes the scene data stored in the file represented by the specified File object using the encoding specified by the integer encoding code and returns the new Scene object.
`static Surface` | `decodeSurfaceFile(File file, int encoding, boolean ui, ExceptionListener listener)`
`static Surface` | `decodeSurfaceFile(File file, int encoding, boolean ui, ExceptionListener listener, Surface s)` Decodes the surface data stored in the file represented by the specified File object using the encoding specified by the integer encoding code and returns the new Surface object.
`static double[]` | `parseDoubles(String s)` Parses a series of double values separated by spaces and returnes an array containing the values.
`static RGB[][]` | `readRGBList(InputStream in, RGB[][] buf)`

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

### RAWEncoding

    public static final int RAWEncoding

  The integer code for a RAW encoding.

  See Also:
    Constant Field Values

### RGBListEncoding

    public static final int RGBListEncoding

  The integer code for a RGB list encoding.

  See Also:
    Constant Field Values

### GTSEncoding

    public static final int GTSEncoding

  The integer code for a GTS encoding.

  See Also:
    Constant Field Values

### PLYEncoding

    public static final int PLYEncoding

  The integer code for a ply encoding.

  See Also:
    Constant Field Values

Constructor Detail

### FileDecoder

    public FileDecoder()

Method Detail

### decodeSceneFile

    public static Scene decodeSceneFile(File file,
                                        int encoding,
                                        boolean ui,
                                        ExceptionListener listener,
                                        Surface s)
                                 throws IOException,
                                        FileNotFoundException

  Decodes the scene data stored in the file represented by the specified File object using the encoding specified by the integer encoding code and returns the new Scene object. If ui is true only SurfaceUI objects will be used. The specified ExceptionListener is notified if an exception occurs when using an XMLDecoder. This method returns null if the encoding is not supported.

  Throws:
    `IOException` - If an IO error occurs.
    `FileNotFoundException` - If the file is not found.

### decodeSceneFile

    public static Scene decodeSceneFile(File file,
                                        int encoding,
                                        boolean ui,
                                        ExceptionListener listener)
                                 throws IOException,
                                        FileNotFoundException

  Throws:
    `IOException`
    `FileNotFoundException`

### decodeScene

    public static Scene decodeScene(InputStream fileIn,
                                    int encoding,
                                    boolean ui,
                                    ExceptionListener listener)
                             throws IOException

  Throws:
    `IOException`

### decodeScene

    public static Scene decodeScene(InputStream fileIn,
                                    int encoding,
                                    boolean ui,
                                    ExceptionListener listener,
                                    Surface s)
                             throws IOException

  Decodes the scene data read from the specified InputStream object using the encoding specified by the integer encoding code and returnes the new Scene object. If ui is true only SurfaceUI objects will be used. The specified ExceptionListener is notified if an exception occurs when using an XMLDecoder. This method returns null if the encoding is not supported.

  Throws:
    `IOException`

### decodeSurfaceFile

    public static Surface decodeSurfaceFile(File file,
                                            int encoding,
                                            boolean ui,
                                            ExceptionListener listener)
                                     throws IOException,
                                            FileNotFoundException

  Throws:
    `IOException`
    `FileNotFoundException`

### decodeSurfaceFile

    public static Surface decodeSurfaceFile(File file,
                                            int encoding,
                                            boolean ui,
                                            ExceptionListener listener,
                                            Surface s)
                                     throws IOException,
                                            FileNotFoundException

  Decodes the surface data stored in the file represented by the specified File object using the encoding specified by the integer encoding code and returns the new Surface object. If ui is true a SurfaceUI object will be returned. The specified ExceptionListener is notified if an exception occurs when using an XMLDecoder. The decodeSurfaceFile method returns null if the encoding is not supported.

  Throws:
    `IOException` - If an IO error occurs.
    `FileNotFoundException` - If the file is not found.

### parseDoubles

    public static double[] parseDoubles(String s)

  Parses a series of double values separated by spaces and returnes an array containing the values.

  Throws:
    `NumberFormatException` - If a number is not correctly formatted.

### readRGBList

    public static RGB[][] readRGBList(InputStream in,
                                      RGB[][] buf)
                               throws IOException

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD