|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiweekly.io.json.JCalRawWriter
public class JCalRawWriter
Writes data to an iCalendar JSON data stream (jCal).
| Constructor Summary | |
|---|---|
JCalRawWriter(Writer writer,
boolean wrapInArray)
Creates a new raw writer. |
|
| Method Summary | |
|---|---|
void |
close()
Finishes writing the JSON document and closes the underlying Writer. |
void |
closeJsonStream()
Finishes writing the JSON document so that it is syntactically correct. |
boolean |
isIndent()
Gets whether or not the JSON will be pretty-printed. |
void |
setIndent(boolean indent)
Sets whether or not to pretty-print the JSON. |
void |
writeEndComponent()
Closes the current component array. |
void |
writeProperty(String propertyName,
ICalDataType dataType,
JCalValue value)
Writes a property to the current component. |
void |
writeProperty(String propertyName,
ICalParameters parameters,
ICalDataType dataType,
JCalValue value)
Writes a property to the current component. |
void |
writeStartComponent(String componentName)
Writes the beginning of a new component array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JCalRawWriter(Writer writer,
boolean wrapInArray)
writer - the writer to the data streamwrapInArray - true to wrap everything in an array, false not to
(useful when writing more than one iCalendar object)| Method Detail |
|---|
public boolean isIndent()
public void setIndent(boolean indent)
indent - true to pretty-print it, false not to (defaults to false)
public void writeStartComponent(String componentName)
throws IOException
componentName - the component name (e.g. "vevent")
IOException - if there's an I/O problem
public void writeEndComponent()
throws IOException
IllegalStateException - if there are no open components (
writeStartComponent(String) must be called first)
IOException - if there's an I/O problem
public void writeProperty(String propertyName,
ICalDataType dataType,
JCalValue value)
throws IOException
propertyName - the property name (e.g. "version")dataType - the property's data type (e.g. "text")value - the property value
IllegalStateException - if there are no open components (
writeStartComponent(String) must be called first) or if the last
method called was writeEndComponent().
IOException - if there's an I/O problem
public void writeProperty(String propertyName,
ICalParameters parameters,
ICalDataType dataType,
JCalValue value)
throws IOException
propertyName - the property name (e.g. "version")parameters - the parametersdataType - the property's data type (e.g. "text")value - the property value
IllegalStateException - if there are no open components (
writeStartComponent(String) must be called first) or if the last
method called was writeEndComponent().
IOException - if there's an I/O problem
public void closeJsonStream()
throws IOException
IOException - if there's a problem closing the stream
public void close()
throws IOException
Writer.
close in interface CloseableIOException - if there's a problem closing the stream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||