Package nz.org.riskscape.engine.output
Class JSONWriter
java.lang.Object
nz.org.riskscape.engine.output.RiskscapeWriter
nz.org.riskscape.engine.output.JSONWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class JSONWriter
extends nz.org.riskscape.engine.output.RiskscapeWriter
Produces a stream of json formatted lines representing each tuple. Not to be confused with GeoJSON, which is a different thing
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
write
(nz.org.riskscape.engine.Tuple value) protected void
writeInternal
(nz.org.riskscape.engine.Tuple value, org.json.JSONWriter jsonWriter)
-
Constructor Details
-
JSONWriter
public JSONWriter(nz.org.riskscape.engine.resource.CreateHandle handle)
-
-
Method Details
-
close
- Throws:
IOException
-
write
public void write(nz.org.riskscape.engine.Tuple value) - Specified by:
write
in classnz.org.riskscape.engine.output.RiskscapeWriter
-
writeInternal
protected void writeInternal(nz.org.riskscape.engine.Tuple value, org.json.JSONWriter jsonWriter) -
getStoredAt
- Specified by:
getStoredAt
in classnz.org.riskscape.engine.output.RiskscapeWriter
-