public final class JsonWriter extends AbstractProjectWriter
Constructor and Description |
---|
JsonWriter() |
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset()
Retrieve the charset to used when writing the JSON file.
|
boolean |
getIncludeLayoutData()
Retrieve a flag indicating if layout data should be included in the output.
|
boolean |
getPretty()
Retrieve the pretty-print flag.
|
TimeUnit |
getTimeUnits()
Retrieve the time units used for durations.
|
boolean |
getWriteAttributeTypes()
Returns true of attribute type information is written to the JSON file.
|
void |
setCharset(Charset charset)
Set the charset to used when writing the JSON file.
|
void |
setIncludeLayoutData(boolean includeLayoutData)
Set a flag indicating if layout data should be included in the output.
|
void |
setPretty(boolean pretty)
Set the pretty-print flag.
|
void |
setTimeUnits(TimeUnit value)
Set the time units to use for durations.
|
void |
setWriteAttributeTypes(boolean writeAttributeTypes)
Sets the flag used to determine if attribute types are written to the JSON file.
|
void |
write(ProjectFile projectFile,
OutputStream stream)
Write a project file's content to the supplied OutputStream instance.
|
write, write
public boolean getPretty()
public void setPretty(boolean pretty)
pretty
- true if pretty printing is enabledpublic boolean getIncludeLayoutData()
public void setIncludeLayoutData(boolean includeLayoutData)
includeLayoutData
- true if layout data is includedpublic Charset getCharset()
public void setCharset(Charset charset)
charset
- charset to usepublic boolean getWriteAttributeTypes()
public void setWriteAttributeTypes(boolean writeAttributeTypes)
writeAttributeTypes
- set to true to write attribute typespublic void setTimeUnits(TimeUnit value)
value
- time unitspublic TimeUnit getTimeUnits()
public void write(ProjectFile projectFile, OutputStream stream) throws IOException
ProjectWriter
projectFile
- project file instancestream
- OutputStream instanceIOException
Copyright © 2000–2024 Packwood Software. All rights reserved.