Class StreamGeometryOutput
- java.lang.Object
-
- org.apache.commons.geometry.io.core.AbstractGeometryIOMetadata
-
- org.apache.commons.geometry.io.core.output.StreamGeometryOutput
-
- All Implemented Interfaces:
GeometryIOMetadata
,GeometryOutput
public class StreamGeometryOutput extends AbstractGeometryIOMetadata implements GeometryOutput
GeometryOutput
implementation that wraps anOutputStream
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.OutputStream
out
Output stream.
-
Constructor Summary
Constructors Constructor Description StreamGeometryOutput(java.io.OutputStream out)
Construct a new instance that writes to the given output stream with no configured file name or charset.StreamGeometryOutput(java.io.OutputStream out, java.lang.String fileName)
Construct a new instance that writes to the given output stream with the configured file name but no charset.StreamGeometryOutput(java.io.OutputStream out, java.lang.String fileName, java.nio.charset.Charset charset)
Construct a new instance that writes to the given output stream with the configured file name and charset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.OutputStream
getOutputStream()
Get the output stream for writing to the output.-
Methods inherited from class org.apache.commons.geometry.io.core.AbstractGeometryIOMetadata
getCharset, getFileName, toString
-
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
-
StreamGeometryOutput
public StreamGeometryOutput(java.io.OutputStream out)
Construct a new instance that writes to the given output stream with no configured file name or charset.- Parameters:
out
- output stream
-
StreamGeometryOutput
public StreamGeometryOutput(java.io.OutputStream out, java.lang.String fileName)
Construct a new instance that writes to the given output stream with the configured file name but no charset.- Parameters:
out
- output streamfileName
- output file name; may be null
-
StreamGeometryOutput
public StreamGeometryOutput(java.io.OutputStream out, java.lang.String fileName, java.nio.charset.Charset charset)
Construct a new instance that writes to the given output stream with the configured file name and charset.- Parameters:
out
- output streamfileName
- output file name; may be nullcharset
- output charset; may be null
-
-
Method Detail
-
getOutputStream
public java.io.OutputStream getOutputStream()
Get the output stream for writing to the output.- Specified by:
getOutputStream
in interfaceGeometryOutput
- Returns:
- output stream for writing to the output
-
-