Class UrlGeometryInput

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

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

    • url

      private final URL url
      Input URL.
  • Constructor Details

    • UrlGeometryInput

      public UrlGeometryInput(URL url)
      Construct a new instance for reading from the given URL.
      Parameters:
      url - input url
    • UrlGeometryInput

      public UrlGeometryInput(URL url, Charset charset)
      Construct a new instance for reading from the given URL with the specified charset.
      Parameters:
      url - input URL
      charset - charset to use when reading content
  • Method Details

    • getUrl

      public URL getUrl()
      Get the input URL.
      Returns:
      input URL
    • 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