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
GeometryInputimplementation for reading content from a URL.
-
-
Field Summary
Fields Modifier and Type Field Description private java.net.URLurlInput URL.
-
Constructor Summary
Constructors Constructor Description UrlGeometryInput(java.net.URL url)Construct a new instance for reading from the given URL.UrlGeometryInput(java.net.URL url, java.nio.charset.Charset charset)Construct a new instance for reading from the given URL with the specified charset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetInputStream()Get the input stream for reading from the input.java.net.URLgetUrl()Get the input URL.java.lang.StringtoString()-
Methods inherited from class org.apache.commons.geometry.io.core.AbstractGeometryIOMetadata
getCharset, getFileName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.geometry.io.core.GeometryIOMetadata
getCharset, getFileName
-
-
-
-
Constructor Detail
-
UrlGeometryInput
public UrlGeometryInput(java.net.URL url)
Construct a new instance for reading from the given URL.- Parameters:
url- input url
-
UrlGeometryInput
public UrlGeometryInput(java.net.URL url, java.nio.charset.Charset charset)Construct a new instance for reading from the given URL with the specified charset.- Parameters:
url- input URLcharset- charset to use when reading content
-
-
Method Detail
-
getUrl
public java.net.URL getUrl()
Get the input URL.- Returns:
- input URL
-
getInputStream
public java.io.InputStream getInputStream()
Get the input stream for reading from the input.The returned input stream is buffered.
- Specified by:
getInputStreamin interfaceGeometryInput- Returns:
- input stream for reading from the input
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractGeometryIOMetadata
-
-