public abstract class AbstractModelIOHandler extends Object implements ModelIOHandler
ModelIOHandler implementations.| Constructor and Description |
|---|
AbstractModelIOHandler() |
| Modifier and Type | Method and Description |
|---|---|
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. |
protected abstract BoundarySource3D |
readInternal(String type,
InputStream in,
DoublePrecisionContext precision)
Internal class used to read a model.
|
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.
|
protected abstract void |
writeInternal(BoundarySource3D model,
String type,
OutputStream out)
Internal class used to write a model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlesTypepublic BoundarySource3D read(String type, File in, DoublePrecisionContext precision)
BoundarySource3D from the given file.read in interface ModelIOHandlertype - the model file typein - file to readprecision - precision context to use in model constructionpublic BoundarySource3D read(String type, InputStream in, DoublePrecisionContext precision)
BoundarySource3D from the given input stream.
The input stream is closed before method return.read in interface ModelIOHandlertype - the model input typein - input streamprecision - precision context to use in model constructionpublic void write(BoundarySource3D model, String type, File out)
write in interface ModelIOHandlermodel - model to writetype - the model file typeout - output filepublic void write(BoundarySource3D model, String type, OutputStream out)
write in interface ModelIOHandlermodel - model to writetype - the model file typeout - output streamprotected abstract BoundarySource3D readInternal(String type, InputStream in, DoublePrecisionContext precision) throws IOException
IOExceptions thrown from here are
wrapped in UncheckedIOExceptions.type - model type; guaranteed to be supported by this instancein - input streamprecision - precision context used to construct the modelIOException - if an IO operation failsprotected abstract void writeInternal(BoundarySource3D model, String type, OutputStream out) throws IOException
IOExceptions thrown from here are
wrapped in UncheckedIOExceptions.model - model to writetype - model type; guaranteed to be supported by this instanceout - input streamIOException - if an IO operation failsCopyright © 2016–2020 The Apache Software Foundation. All rights reserved.