Class FileGeometryInput

java.lang.Object
org.apache.commons.geometry.io.core.AbstractGeometryIOMetadata
org.apache.commons.geometry.io.core.input.FileGeometryInput
All Implemented Interfaces:
GeometryIOMetadata, GeometryInput

public class FileGeometryInput extends AbstractGeometryIOMetadata implements GeometryInput
GeometryInput implementation for reading content from a file.
  • Field Details

    • file

      private final Path file
      Input file.
  • Constructor Details

    • FileGeometryInput

      public FileGeometryInput(Path file)
      Construct a new instance for reading from the given file.
      Parameters:
      file - input file
    • FileGeometryInput

      public FileGeometryInput(Path file, Charset charset)
      Construct a new instance for reading from the given file with the specific charset.
      Parameters:
      file - input file
      charset - charset to use when reading from the input file
  • Method Details

    • getFile

      public Path getFile()
      Get the input file.
      Returns:
      input file
    • getInputStream

      public InputStream getInputStream()
      Get the input stream for reading from the input.

      The returned input stream is buffered.

      Specified by:
      getInputStream in interface GeometryInput
      Returns:
      input stream for reading from the input
    • toString

      public String toString()
      Overrides:
      toString in class AbstractGeometryIOMetadata