Detectar formato de archivo 3D

Detectar formato de muestra de programación

Este código fuente ilustra cómo detectar el formato del archivo (utilizando la ruta de acceso o flujo) y comprobar su extensión.

// the path to the documents directory.
String MyDir = RunExamples.getDataDir();
// detect format of 3D file
FileFormat inputFormat = FileFormat.detect(MyDir + "document.fbx");
// display the file format
System.out.println("File Format: " + inputFormat.toString());