Upptäck format för 3D-filen
Contents
[
Hide
]
Aspose. 3D for Java API har stöd för att upptäcka 3D stödda format innan det öppnas eftersom filändelsen inte garanterar att filens innehåll är lämpligt.
Detektera formatprogrammeringsprover
Denna källkod illustrerar hur man upptäcker filformatet (med hjälp av fil sökvägen eller strömmen) och kontrollera dess tillägg.
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()); |