public interface ModelIOHandler
UncheckedIOException instead of IOException.
Implementations of this interface are expected to be thread-safe.
| Modifier and Type | Method and Description |
|---|---|
boolean |
handlesType(String type)
Return true if this instance handles 3D model files of the given type.
|
BoundarySource3D |
read(String type,
File in,
DoublePrecisionContext precision)
Read a 3D model represented as a
BoundarySource3D from the given file. |
BoundarySource3D |
read(String type,
InputStream in,
DoublePrecisionContext precision)
Read a 3D model represented as a
BoundarySource3D from the given input stream. |
void |
write(BoundarySource3D model,
String type,
File out)
Write the model to the file using the specified file type.
|
void |
write(BoundarySource3D model,
String type,
OutputStream out)
Write the model to the given output stream, using the specified model type.
|
boolean handlesType(String type)
type - type 3D model type, indicated by file extensionBoundarySource3D read(String type, File in, DoublePrecisionContext precision)
BoundarySource3D from the given file.type - the model file typein - file to readprecision - precision context to use in model constructionUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedBoundarySource3D read(String type, InputStream in, DoublePrecisionContext precision)
BoundarySource3D from the given input stream.
The input stream is closed before method return.type - the model input typein - input streamprecision - precision context to use in model constructionUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedvoid write(BoundarySource3D model, String type, File out)
model - model to writetype - the model file typeout - output fileUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedvoid write(BoundarySource3D model, String type, OutputStream out)
model - model to writetype - the model file typeout - output streamUncheckedIOException - if an IO operation failsIllegalArgumentException - if the file type is not supportedCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.