Определение формата файла 3D
Contents
[
Hide
]
Aspose.3D for Java API поддерживает определение поддерживаемых форматов 3D перед открытием, поскольку расширение файла не гарантирует, что содержимое файла подходит.
Обнаружить образец программирования формата
Этот исходный код иллюстрирует, как обнаружить формат файла (используя путь к файлу или поток) и проверить его расширение.
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()); |