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 an OutputStream.
  • Field Details

  • Constructor Details

    • StreamGeometryOutput

      public StreamGeometryOutput(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(OutputStream out, String fileName)
      Construct a new instance that writes to the given output stream with the configured file name but no charset.
      Parameters:
      out - output stream
      fileName - output file name; may be null
    • StreamGeometryOutput

      public StreamGeometryOutput(OutputStream out, String fileName, Charset charset)
      Construct a new instance that writes to the given output stream with the configured file name and charset.
      Parameters:
      out - output stream
      fileName - output file name; may be null
      charset - output charset; may be null
  • Method Details

    • getOutputStream

      public OutputStream getOutputStream()
      Get the output stream for writing to the output.
      Specified by:
      getOutputStream in interface GeometryOutput
      Returns:
      output stream for writing to the output