net.yura.mobile.io
Class JSONUtil
java.lang.Object
net.yura.mobile.io.JSONUtil
public class JSONUtil
- extends Object
- Author:
- Yura Mamyrin
Method Summary |
Object |
load(InputStream in)
|
protected Hashtable |
readHashtable(JSONTokener x)
|
protected Object |
readObject(JSONTokener x)
this method can detect string, null, true, false, or any object |
protected Object |
readObject(JSONTokener tokener,
String name)
|
protected Vector |
readVector(JSONTokener x)
|
void |
save(OutputStream out,
Object obj)
|
protected void |
saveArray(JSONWriter serializer,
Object[] object)
|
protected void |
saveHashtable(JSONWriter serializer,
Hashtable hashtable)
|
protected void |
saveObject(JSONWriter serializer,
Object object)
|
protected void |
saveVector(JSONWriter serializer,
Vector object)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONUtil
public JSONUtil()
load
public Object load(InputStream in)
throws IOException
- Throws:
IOException
readHashtable
protected Hashtable readHashtable(JSONTokener x)
throws IOException
- Throws:
IOException
readObject
protected Object readObject(JSONTokener x)
throws IOException
- this method can detect string, null, true, false, or any object
- Throws:
IOException
readObject
protected Object readObject(JSONTokener tokener,
String name)
throws IOException
- Throws:
IOException
readVector
protected Vector readVector(JSONTokener x)
throws IOException
- Throws:
IOException
save
public void save(OutputStream out,
Object obj)
throws IOException
- Throws:
IOException
saveArray
protected void saveArray(JSONWriter serializer,
Object[] object)
throws IOException
- Throws:
IOException
saveHashtable
protected void saveHashtable(JSONWriter serializer,
Hashtable hashtable)
throws IOException
- Throws:
IOException
saveObject
protected void saveObject(JSONWriter serializer,
Object object)
throws IOException
- Throws:
IOException
saveVector
protected void saveVector(JSONWriter serializer,
Vector object)
throws IOException
- Throws:
IOException