Class StlFacetDefinitionReaders

java.lang.Object
org.apache.commons.geometry.io.euclidean.threed.stl.StlFacetDefinitionReaders

public final class StlFacetDefinitionReaders extends Object
Utility class with factory methods for constructing FacetDefinitionReader instances for STL content.
  • Constructor Details

    • StlFacetDefinitionReaders

      private StlFacetDefinitionReaders()
      Utility class; no instantiation.
  • Method Details

    • create

      public static FacetDefinitionReader create(InputStream in, Charset charset)
      Construct a FacetDefinitionReader for reading STL content from the given input. The format of the input is checked to determine if it is a binary or text file and an appropriate reader is returned.
      Parameters:
      in - input to read from
      charset - charset to use when checking the input for text content; if null, the input is assumed to use the UTF-8 charset
      Returns:
      facet definition reader
      Throws:
      IllegalStateException - if a parsing error occurs
      UncheckedIOException - if an I/O error occurs