FileFormat
Inheritance: java.lang.Object
public class FileFormat
File format definition
Fields
Field | Description |
---|---|
AMF | Additive manufacturing file format |
ASE | 3D Studio Max’s ASCII Scene Exporter format. |
ASPOSE3D_WEB | Aspose.3D Web format. |
COLLADA | Collada file format |
DISCREET3DS | 3D Studio’s file format |
DRACO | Google Draco Mesh |
DXF | AutoCAD DXF |
FBX6100ASCII | ASCII FBX file format, with 6.1.0 version |
FBX6100_BINARY | Binary FBX file format, with 6.1.0 version |
FBX7200ASCII | ASCII FBX file format, with 7.2.0 version |
FBX7200_BINARY | Binary FBX file format, with 7.2.0 version |
FBX7300ASCII | ASCII FBX file format, with 7.3.0 version |
FBX7300_BINARY | Binary FBX file format, with 7.3.0 version |
FBX7400ASCII | ASCII FBX file format, with 7.4.0 version |
FBX7400_BINARY | Binary FBX file format, with 7.4.0 version |
FBX7500ASCII | ASCII FBX file format, with 7.5.0 version |
FBX7500_BINARY | Binary FBX file format, with 7.5.0 version |
FBX7600ASCII | ASCII FBX file format, with 7.6.0 version |
FBX7600_BINARY | Binary FBX file format, with 7.6.0 version |
FBX7700ASCII | ASCII FBX file format, with 7.7.0 version |
FBX7700_BINARY | Binary FBX file format, with 7.7.0 version |
GLTF | Khronos Group’s glTF |
GLTF2 | Khronos Group’s glTF version 2.0 |
GLTF2_BINARY | Khronos Group’s glTF version 2.0 |
GLTF_BINARY | Khronos Group’s glTF in Binary format |
HTML5 | HTML5 File |
IFC | ISO 16739-1 Industry Foundation Classes data model. |
MAYAASCII | Autodesk Maya in ASCII format |
MAYA_BINARY | Autodesk Maya in Binary format |
MICROSOFT3MF | Microsoft 3D Manufacturing Format |
PCD | PCL Point Cloud Data file in ASCII mode |
PCD_BINARY | PCL Point Cloud Data file in Binary mode |
Adobe’s Portable Document Format | |
PLY | Polygon File Format or Stanford Triangle Format |
RVM_BINARY | AVEVA Plant Design Management System Model in binary format |
RVM_TEXT | AVEVA Plant Design Management System Model in text format |
SIEMENSJT8 | Siemens JT File Version 8 |
SIEMENSJT9 | Siemens JT File Version 9 |
STLASCII | ASCII STL file format |
STL_BINARY | Binary STL file format |
UNIVERSAL3D | Universal3D file format |
USD | Universal Scene Description |
USDA | Universal Scene Description in ASCII format. |
USDZ | Compressed Universal Scene Description |
VRML | The Virtual Reality Modeling Language |
WAVEFRONTOBJ | Wavefront’s Obj file format |
XYZ | Xyz point cloud file |
X_BINARY | DirectX X File in binary format |
X_TEXT | DirectX X File in binary format |
ZIP | Zip archive that contains other 3d file format. |
Methods
Method | Description |
---|---|
createLoadOptions() | Create a default load options for this file format |
createSaveOptions() | Create a default save options for this file format |
detect(Stream stream, String fileName) | Detect the file format from data stream, file name is optional for guessing types that has no magic header. |
detect(String fileName) | Detect the file format from file name, file must be readable so Aspose.3D can detect the file format through file header. |
equals(Object arg0) | |
getCanExport() | Gets whether Aspose.3D supports export scene to current file format. |
getCanImport() | Gets whether Aspose.3D supports import scene from current file format. |
getClass() | |
getContentType() | Gets file format content type Example: |
getExtension() | Gets the extension name of this type. |
getExtensions() | Gets the extension names of this type. |
getFileFormatType() | Gets file format type |
getFormatByExtension(String extensionName) | Gets the preferred file format from the file extension name The extension name should starts with a dot(’.’). |
getVersion() | Gets file format version |
hashCode() | |
notify() | |
notifyAll() | |
toString() | Formats to string |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
AMF
public static final FileFormat AMF
Additive manufacturing file format
ASE
public static final FileFormat ASE
3D Studio Max’s ASCII Scene Exporter format.
ASPOSE3D_WEB
public static final FileFormat ASPOSE3D_WEB
Aspose.3D Web format.
COLLADA
public static final FileFormat COLLADA
Collada file format
DISCREET3DS
public static final FileFormat DISCREET3DS
3D Studio’s file format
DRACO
public static final DracoFormat DRACO
Google Draco Mesh
DXF
public static final FileFormat DXF
AutoCAD DXF
FBX6100ASCII
public static final FileFormat FBX6100ASCII
ASCII FBX file format, with 6.1.0 version
FBX6100_BINARY
public static final FileFormat FBX6100_BINARY
Binary FBX file format, with 6.1.0 version
FBX7200ASCII
public static final FileFormat FBX7200ASCII
ASCII FBX file format, with 7.2.0 version
FBX7200_BINARY
public static final FileFormat FBX7200_BINARY
Binary FBX file format, with 7.2.0 version
FBX7300ASCII
public static final FileFormat FBX7300ASCII
ASCII FBX file format, with 7.3.0 version
FBX7300_BINARY
public static final FileFormat FBX7300_BINARY
Binary FBX file format, with 7.3.0 version
FBX7400ASCII
public static final FileFormat FBX7400ASCII
ASCII FBX file format, with 7.4.0 version
FBX7400_BINARY
public static final FileFormat FBX7400_BINARY
Binary FBX file format, with 7.4.0 version
FBX7500ASCII
public static final FileFormat FBX7500ASCII
ASCII FBX file format, with 7.5.0 version
FBX7500_BINARY
public static final FileFormat FBX7500_BINARY
Binary FBX file format, with 7.5.0 version
FBX7600ASCII
public static final FileFormat FBX7600ASCII
ASCII FBX file format, with 7.6.0 version
FBX7600_BINARY
public static final FileFormat FBX7600_BINARY
Binary FBX file format, with 7.6.0 version
FBX7700ASCII
public static final FileFormat FBX7700ASCII
ASCII FBX file format, with 7.7.0 version
FBX7700_BINARY
public static final FileFormat FBX7700_BINARY
Binary FBX file format, with 7.7.0 version
GLTF
public static final FileFormat GLTF
Khronos Group’s glTF
GLTF2
public static final FileFormat GLTF2
Khronos Group’s glTF version 2.0
GLTF2_BINARY
public static final FileFormat GLTF2_BINARY
Khronos Group’s glTF version 2.0
GLTF_BINARY
public static final FileFormat GLTF_BINARY
Khronos Group’s glTF in Binary format
HTML5
public static final FileFormat HTML5
HTML5 File
IFC
public static final FileFormat IFC
ISO 16739-1 Industry Foundation Classes data model.
MAYAASCII
public static final FileFormat MAYAASCII
Autodesk Maya in ASCII format
MAYA_BINARY
public static final FileFormat MAYA_BINARY
Autodesk Maya in Binary format
MICROSOFT3MF
public static final FileFormat MICROSOFT3MF
Microsoft 3D Manufacturing Format
PCD
public static final FileFormat PCD
PCL Point Cloud Data file in ASCII mode
PCD_BINARY
public static final FileFormat PCD_BINARY
PCL Point Cloud Data file in Binary mode
public static final PdfFormat PDF
Adobe’s Portable Document Format
PLY
public static final PlyFormat PLY
Polygon File Format or Stanford Triangle Format
RVM_BINARY
public static final RvmFormat RVM_BINARY
AVEVA Plant Design Management System Model in binary format
RVM_TEXT
public static final RvmFormat RVM_TEXT
AVEVA Plant Design Management System Model in text format
SIEMENSJT8
public static final FileFormat SIEMENSJT8
Siemens JT File Version 8
SIEMENSJT9
public static final FileFormat SIEMENSJT9
Siemens JT File Version 9
STLASCII
public static final FileFormat STLASCII
ASCII STL file format
STL_BINARY
public static final FileFormat STL_BINARY
Binary STL file format
UNIVERSAL3D
public static final FileFormat UNIVERSAL3D
Universal3D file format
USD
public static final FileFormat USD
Universal Scene Description
USDA
public static final FileFormat USDA
Universal Scene Description in ASCII format.
USDZ
public static final FileFormat USDZ
Compressed Universal Scene Description
VRML
public static final FileFormat VRML
The Virtual Reality Modeling Language
WAVEFRONTOBJ
public static final FileFormat WAVEFRONTOBJ
Wavefront’s Obj file format
XYZ
public static final FileFormat XYZ
Xyz point cloud file
X_BINARY
public static final FileFormat X_BINARY
DirectX X File in binary format
X_TEXT
public static final FileFormat X_TEXT
DirectX X File in binary format
ZIP
public static final FileFormat ZIP
Zip archive that contains other 3d file format.
createLoadOptions()
public LoadOptions createLoadOptions()
Create a default load options for this file format
Returns: LoadOptions
createSaveOptions()
public SaveOptions createSaveOptions()
Create a default save options for this file format
Returns: SaveOptions
detect(Stream stream, String fileName)
public static FileFormat detect(Stream stream, String fileName)
Detect the file format from data stream, file name is optional for guessing types that has no magic header.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | com.aspose.csporter.helpers.Stream | |
fileName | java.lang.String | Example: |
byte[] bytes = new byte[100];//take the bytes from your source
var fmt = FileFormat.detect(new MemoryStream(bytes), "input-file");
System.out.printf("Input data format: %s", fmt);
``` |
**Returns:**
[FileFormat](../../com.aspose.threed/fileformat)
### detect(String fileName) {#detect-java.lang.String-}
public static FileFormat detect(String fileName)
Detect the file format from file name, file must be readable so Aspose.3D can detect the file format through file header.
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| fileName | java.lang.String | **Example:**
var fmt = FileFormat.detect(“input.fbx”); System.out.printf(“Input file format: %s”, fmt);
**Returns:**
[FileFormat](../../com.aspose.threed/fileformat)
### equals(Object arg0) {#equals-java.lang.Object-}
public boolean equals(Object arg0)
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | java.lang.Object | |
**Returns:**
boolean
### getCanExport() {#getCanExport--}
public boolean getCanExport()
Gets whether Aspose.3D supports export scene to current file format. **Example:** The following code shows how to check if exporting to specified format is supported.
var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); if (format.getCanExport()) System.out.printf(“Can export to %s”, outputFormat);
**Returns:**
boolean
### getCanImport() {#getCanImport--}
public boolean getCanImport()
Gets whether Aspose.3D supports import scene from current file format. **Example:** The following code shows how to check if importing from specified format is supported.
var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); if (format.getCanImport()) System.out.printf(“Can import from %s”, outputFormat);
**Returns:**
boolean
### getClass() {#getClass--}
public final native Class getClass()
**Returns:**
java.lang.Class<?>
### getContentType() {#getContentType--}
public FileContentType getContentType()
Gets file format content type **Example:**
var format = FileFormat.MAYA_BINARY; if (format.getContentType() == FileContentType.BINARY) System.out.printf("%s is binary format", format); else System.out.printf("%s is text-based format", format);
**Returns:**
[FileContentType](../../com.aspose.threed/filecontenttype)
### getExtension() {#getExtension--}
public String getExtension()
Gets the extension name of this type. **Example:**
var format = FileFormat.MAYA_BINARY; System.out.printf(“Extension of %s is %s”, format, format.getExtension());
**Returns:**
java.lang.String
### getExtensions() {#getExtensions--}
public String[] getExtensions()
Gets the extension names of this type.
**Returns:**
java.lang.String[]
### getFileFormatType() {#getFileFormatType--}
public FileFormatType getFileFormatType()
Gets file format type
**Returns:**
[FileFormatType](../../com.aspose.threed/fileformattype)
### getFormatByExtension(String extensionName) {#getFormatByExtension-java.lang.String-}
public static FileFormat getFormatByExtension(String extensionName)
Gets the preferred file format from the file extension name The extension name should starts with a dot('.').
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| extensionName | java.lang.String | |
**Returns:**
[FileFormat](../../com.aspose.threed/fileformat) - Instance of [FileFormat](../../com.aspose.threed/fileformat), otherwise null returned. **Example:** The following code shows how to save scene to memory using specified format
Scene scene = new Scene(new Box()); var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); var output = new ByteArrayOutputStream(); try(var stream = Stream.wrap(output)) { scene.save(stream); }
### getVersion() {#getVersion--}
public Version getVersion()
Gets file format version
**Returns:**
com.aspose.csporter.helpers.Version
### hashCode() {#hashCode--}
public native int hashCode()
**Returns:**
int
### notify() {#notify--}
public final native void notify()
### notifyAll() {#notifyAll--}
public final native void notifyAll()
### toString() {#toString--}
public String toString()
Formats to string
**Returns:**
java.lang.String - Object string
### wait() {#wait--}
public final void wait()
### wait(long arg0) {#wait-long-}
public final void wait(long arg0)
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long | |
### wait(long arg0, int arg1) {#wait-long-int-}
public final void wait(long arg0, int arg1)
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long | |
| arg1 | int | |