Détecter le format du fichier 3D
Contents
[
Hide
]
Aspose.3D for Java API prend en charge la détection des formats pris en charge par 3D avant l’ouverture car l’extension du fichier ne garantit pas que le contenu du fichier est approprié.
Détecter l’échantillon de programmation de format
Ce code source illustre comment détecter le format de fichier (à l’aide du chemin de fichier ou du flux) et vérifier son extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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()); |