|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.portlets.user.tdw.server.datasource.util.GridJSonWriter
public class GridJSonWriter
| Nested Class Summary | |
|---|---|
protected static class |
GridJSonWriter.JGridSonWriterState
|
| Field Summary | |
|---|---|
protected boolean |
dataDeclared
|
protected int |
fieldsCount
|
protected boolean |
firstColumn
|
protected boolean |
firstField
|
protected boolean |
firstRow
|
protected boolean |
offsetDeclared
|
protected int |
rowsCount
|
protected GridJSonWriter.JGridSonWriterState |
state
|
protected boolean |
totalLengthDeclared
|
protected Writer |
writer
|
| Constructor Summary | |
|---|---|
GridJSonWriter(Writer writer)
|
|
| Method Summary | |
|---|---|
protected void |
addKey(String key)
|
void |
addValue(String id,
Boolean value)
Adds a new value in the row. |
void |
addValue(String id,
Date value)
Adds a new value in the row. |
void |
addValue(String id,
Double value)
Adds a new value in the row. |
void |
addValue(String id,
Float value)
Adds a new value in the row. |
void |
addValue(String id,
Long value)
Adds a new value in the row. |
void |
addValue(String id,
String value)
Adds a new value in the row. |
protected void |
addValueKey(String key)
|
protected void |
appendQuoted(String value)
Produce a string in double quotes with backslash sequences in all the right places. |
protected void |
checkFirstField()
|
protected void |
checkState(GridJSonWriter.JGridSonWriterState expectedState)
|
void |
close()
|
void |
endData()
Ends the data field. |
void |
endRow()
Ends the data row. |
void |
setOffset(String offsetField,
int offset)
|
void |
setTotalLength(String totalLengthField,
int length)
Set the total length field. |
void |
startData(String dataField)
Starts the data field. |
void |
startRow()
Starts a new data row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GridJSonWriter.JGridSonWriterState state
protected boolean dataDeclared
protected boolean totalLengthDeclared
protected boolean offsetDeclared
protected Writer writer
protected boolean firstField
protected boolean firstRow
protected boolean firstColumn
protected int rowsCount
protected int fieldsCount
| Constructor Detail |
|---|
public GridJSonWriter(Writer writer)
throws IOException
IOException| Method Detail |
|---|
protected void checkState(GridJSonWriter.JGridSonWriterState expectedState)
protected void checkFirstField()
throws IOException
IOException
public void startData(String dataField)
throws IOException
dataField - the data field name.
IOException
public void startRow()
throws IOException
IOException
protected void addKey(String key)
throws IOException
IOException
protected void addValueKey(String key)
throws IOException
IOException
public void addValue(String id,
Boolean value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void addValue(String id,
Date value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void addValue(String id,
Double value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void addValue(String id,
Float value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void addValue(String id,
Long value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void addValue(String id,
String value)
throws IOException
id - the value id.value - the value to insert.
IOException
public void endRow()
throws IOException
IOException
public void endData()
throws IOException
IOException
public void setTotalLength(String totalLengthField,
int length)
throws IOException
totalLengthField - length -
IOException
public void setOffset(String offsetField,
int offset)
throws IOException
IOException
public void close()
throws IOException
IOException
protected void appendQuoted(String value)
throws IOException
value - A String
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||