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 Summary
Fields Modifier and Type Field Description private java.nio.file.Path
file
Input file.
-
Constructor Summary
Constructors Constructor Description FileGeometryInput(java.nio.file.Path file)
Construct a new instance for reading from the given file.FileGeometryInput(java.nio.file.Path file, java.nio.charset.Charset charset)
Construct a new instance for reading from the given file with the specific charset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.Path
getFile()
Get the input file.java.io.InputStream
getInputStream()
Get the input stream for reading from the input.java.lang.String
toString()
-
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
-
FileGeometryInput
public FileGeometryInput(java.nio.file.Path file)
Construct a new instance for reading from the given file.- Parameters:
file
- input file
-
FileGeometryInput
public FileGeometryInput(java.nio.file.Path file, java.nio.charset.Charset charset)
Construct a new instance for reading from the given file with the specific charset.- Parameters:
file
- input filecharset
- charset to use when reading from the input file
-
-
Method Detail
-
getFile
public java.nio.file.Path getFile()
Get the input file.- Returns:
- input file
-
getInputStream
public java.io.InputStream getInputStream()
Get the input stream for reading from the input.The returned input stream is buffered.
- Specified by:
getInputStream
in interfaceGeometryInput
- Returns:
- input stream for reading from the input
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractGeometryIOMetadata
-
-