public final class FileExporterFactory extends Object
file exporter
based on the
extension of the supplied file.
A typical export looks something like this:
FileExporterFactory .createExporter(new File("path/to/the/file/file.ext")) .writeToFile(object.toCSG().toFacets());
Modifier and Type | Method and Description |
---|---|
static IFileExporter |
createExporter(File file)
Creates a
file exporter based on the
extension of the supplied file. |
public static IFileExporter createExporter(File file) throws FileNotFoundException, IOException
file exporter
based on the
extension of the supplied file. The currently known extensions are stl
and ply
.
The result will be a binary STL exporter
for the former one and a Polygon exporter
for the latter.file
- the file to be usedIOException
- if an I/O error occurs during the close operation of the fileFileNotFoundException
- if the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reasonUnknownFileExtensionException
- if the extension of the given file is unknownCopyright © 2014–2020, Printing in 3D. All rights reserved.