Skip to content
Permalink
Browse files
updating docs to discuss possible runtime exceptions in IO methods
  • Loading branch information
darkma773r committed Jul 24, 2021
1 parent e711ca0 commit b9db536fbd028223cd1a06a2c996da925506ba4b
Showing 5 changed files with 36 additions and 17 deletions.
@@ -187,6 +187,7 @@ public W getWriteHandlerForFileExtension(final String fileExt) {
}

/** Return a {@link BoundarySource} containing all boundaries from the given input.
* A runtime exception may be thrown if mathematically invalid boundaries are encountered.
* @param in input to read boundaries from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -210,7 +211,8 @@ public B read(final GeometryInput in, final GeometryFormat fmt, final Precision.
* }
* </pre>
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param in input to read boundaries from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -44,7 +44,8 @@
GeometryFormat getFormat();

/** Return an object containing all boundaries read from {@code input} using the handler's
* supported data format.
* supported data format. Implementations may throw runtime exceptions if mathematically
* invalid boundaries are encountered.
* @param input input to read form
* @param precision precision context used for floating point comparisons
* @return object containing all boundaries read from {@code input}
@@ -70,7 +71,8 @@
* </pre>
*
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param in input to read from
* @param precision precision context used for floating point comparisons
* @return stream providing access to the boundary information from the given input
@@ -96,7 +96,8 @@ public Stream<FacetDefinition> facets(final GeometryInput in, final GeometryForm
* }
* </pre>
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param in input to read from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -112,6 +113,7 @@ public Stream<Triangle3D> triangles(final GeometryInput in, final GeometryFormat
}

/** Return a {@link TriangleMesh} containing all triangles from the given input.
* A runtime exception may be thrown if mathematically invalid boundaries are encountered.
* @param in input to read from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -68,7 +68,8 @@ public interface BoundaryReadHandler3D extends BoundaryReadHandler<PlaneConvexSu
*/
Stream<FacetDefinition> facets(GeometryInput in) throws IOException;

/** Read a triangle mesh from the given input.
/** Read a triangle mesh from the given input. Implementations may throw runtime
* exceptions if mathematically invalid boundaries are encountered.
* @param in input stream to read from
* @param precision precision context used for floating point comparisons
* @return triangle mesh containing the data from the given input stream
@@ -191,7 +191,8 @@ public static Stream<FacetDefinition> facets(final GeometryInput in, final Geome
* </pre>
*
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param path file path to read from
* @param precision precision context used for floating point comparisons
* @return stream providing access to the boundaries in the specified file
@@ -219,7 +220,8 @@ public static Stream<PlaneConvexSubset> boundaries(final Path path, final Precis
* </pre>
*
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param url URL to read from
* @param precision precision context used for floating point comparisons
* @return stream providing access to the boundaries in the specified URL
@@ -242,7 +244,8 @@ public static Stream<PlaneConvexSubset> boundaries(final URL url, final Precisio
* }
* </pre>
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param in input to read boundaries from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -272,7 +275,8 @@ public static Stream<PlaneConvexSubset> boundaries(final GeometryInput in, final
* </pre>
*
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param path file path to read from
* @param precision precision context used for floating point comparisons
* @return stream providing access to the triangles in the specified file
@@ -300,7 +304,8 @@ public static Stream<Triangle3D> triangles(final Path path, final Precision.Doub
* </pre>
*
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param url URL to read from
* @param precision precision context used for floating point comparisons
* @return stream providing access to the triangles from the specified URL
@@ -323,7 +328,8 @@ public static Stream<Triangle3D> triangles(final URL url, final Precision.Double
* }
* </pre>
* <p>An {@link IOException} is thrown immediately by this method if stream creation fails. Any IO errors
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}.</p>
* occurring during stream iteration are wrapped with {@link java.io.UncheckedIOException}. Other runtime
* exceptions may be thrown during stream iteration if mathematically invalid boundaries are encountered.</p>
* @param in input to read from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -340,7 +346,8 @@ public static Stream<Triangle3D> triangles(final GeometryInput in, final Geometr
}

/** Return a {@link BoundarySource3D} containing all boundaries from the file at the
* given path. The data format is determined from the file extension.
* given path. The data format is determined from the file extension. A runtime exception may be
* thrown if mathematically invalid boundaries are encountered.
* @param path file path to read from
* @param precision precision context used for floating point comparisons
* @return object containing all boundaries from the file at the given path
@@ -355,7 +362,8 @@ public static BoundarySource3D read(final Path path, final Precision.DoubleEquiv
}

/** Return a {@link BoundarySource3D} containing all boundaries from the given URL. The data
* format is determined from the file extension of the URL path.
* format is determined from the file extension of the URL path. A runtime exception may be
* thrown if mathematically invalid boundaries are encountered.
* @param url URL to read from
* @param precision precision context used for floating point comparisons
* @return object containing all boundaries from the given URL
@@ -369,7 +377,8 @@ public static BoundarySource3D read(final URL url, final Precision.DoubleEquival
return read(new UrlGeometryInput(url), null, precision);
}

/** Return a {@link BoundarySource3D} containing all boundaries from the given input.
/** Return a {@link BoundarySource3D} containing all boundaries from the given input. A runtime
* exception may be thrown if mathematically invalid boundaries are encountered.
* @param in input to read boundaries from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}
@@ -386,7 +395,8 @@ public static BoundarySource3D read(final GeometryInput in, final GeometryFormat
}

/** Return a {@link TriangleMesh} containing all triangles from the given file path. The data
* format is determined from the file extension of the path.
* format is determined from the file extension of the path. A runtime exception may be
* thrown if mathematically invalid boundaries are encountered.
* @param path file path to read from
* @param precision precision context used for floating point comparisons
* @return mesh containing all triangles from the given file path
@@ -401,7 +411,8 @@ public static TriangleMesh readTriangleMesh(final Path path, final Precision.Dou
}

/** Return a {@link TriangleMesh} containing all triangles from the given URL. The data
* format is determined from the file extension of the URL path.
* format is determined from the file extension of the URL path. A runtime exception may be
* thrown if mathematically invalid boundaries are encountered.
* @param url URL to read from
* @param precision precision context used for floating point comparisons
* @return mesh containing all triangles from the given URL
@@ -415,7 +426,8 @@ public static TriangleMesh readTriangleMesh(final URL url, final Precision.Doubl
return readTriangleMesh(new UrlGeometryInput(url), null, precision);
}

/** Return a {@link TriangleMesh} containing all triangles from the given input.
/** Return a {@link TriangleMesh} containing all triangles from the given input. A runtime exception
* may be thrown if mathematically invalid boundaries are encountered.
* @param in input to read from
* @param fmt format of the input; if null, the format is determined implicitly from the
* file extension of the input {@link GeometryInput#getFileName() file name}

0 comments on commit b9db536

Please sign in to comment.