jsdsi.sexp
Class SexpUtil
java.lang.Object
|
+--jsdsi.sexp.SexpUtil
- public class SexpUtil
- extends java.lang.Object
Utilities for converting SDSI objects to S-expression objects.
- Author:
- Sameer Ajmani
Method Summary |
static void |
check(boolean test,
java.lang.String message)
|
static void |
checkDone(java.util.Iterator i,
java.lang.String message)
|
static void |
checkType(SexpList l,
java.lang.String type)
|
static java.util.Iterator |
getBody(SexpList l)
|
static byte[] |
getByteArray(Sexp s)
|
static SexpList |
getList(Sexp s)
|
static SexpList |
getList(Sexp s,
java.lang.String type)
|
static Sexp |
getNext(java.util.Iterator i,
java.lang.String message)
|
static byte[] |
getNextByteArray(java.util.Iterator i,
java.lang.String message)
|
static SexpList |
getNextList(java.util.Iterator i,
java.lang.String message)
|
static SexpList |
getNextList(java.util.Iterator i,
java.lang.String type,
java.lang.String message)
|
static java.lang.String |
getNextString(java.util.Iterator i,
java.lang.String message)
|
static SexpString |
getSexpString(Sexp s)
|
static java.lang.String |
getString(Sexp s)
|
static java.util.Date |
parseDate(java.lang.String s)
|
static java.net.URL[] |
parseURLs(SexpList l)
|
static SexpString |
toSexp(byte[] b)
|
static SexpString |
toSexp(java.util.Date d)
|
static SexpString |
toSexp(java.lang.String s)
|
static SexpList |
toSexp(java.lang.String type,
java.util.List l)
|
static SexpList |
toSexp(java.lang.String type,
Sexp[] ss)
|
static SexpList |
toSexp(java.net.URL[] u)
|
static Sexp |
toSexpComment(java.lang.String c)
|
static SexpList |
toSexpList(java.lang.String type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SexpUtil
public SexpUtil()
toSexp
public static SexpList toSexp(java.lang.String type,
Sexp[] ss)
toSexpList
public static SexpList toSexpList(java.lang.String type)
toSexp
public static SexpList toSexp(java.lang.String type,
java.util.List l)
toSexp
public static SexpString toSexp(java.lang.String s)
toSexp
public static SexpString toSexp(byte[] b)
toSexp
public static SexpList toSexp(java.net.URL[] u)
toSexpComment
public static Sexp toSexpComment(java.lang.String c)
toSexp
public static SexpString toSexp(java.util.Date d)
parseDate
public static java.util.Date parseDate(java.lang.String s)
throws SexpParseException
SexpParseException
check
public static void check(boolean test,
java.lang.String message)
throws SexpParseException
SexpParseException
getSexpString
public static SexpString getSexpString(Sexp s)
throws SexpParseException
SexpParseException
getByteArray
public static byte[] getByteArray(Sexp s)
throws SexpParseException
SexpParseException
getString
public static java.lang.String getString(Sexp s)
throws SexpParseException
SexpParseException
checkType
public static void checkType(SexpList l,
java.lang.String type)
throws SexpParseException
SexpParseException
getList
public static SexpList getList(Sexp s,
java.lang.String type)
throws SexpParseException
SexpParseException
getList
public static SexpList getList(Sexp s)
throws SexpParseException
SexpParseException
getBody
public static java.util.Iterator getBody(SexpList l)
getNext
public static Sexp getNext(java.util.Iterator i,
java.lang.String message)
throws SexpParseException
SexpParseException
getNextByteArray
public static byte[] getNextByteArray(java.util.Iterator i,
java.lang.String message)
throws SexpParseException
SexpParseException
getNextString
public static java.lang.String getNextString(java.util.Iterator i,
java.lang.String message)
throws SexpParseException
SexpParseException
getNextList
public static SexpList getNextList(java.util.Iterator i,
java.lang.String message)
throws SexpParseException
SexpParseException
getNextList
public static SexpList getNextList(java.util.Iterator i,
java.lang.String type,
java.lang.String message)
throws SexpParseException
SexpParseException
checkDone
public static void checkDone(java.util.Iterator i,
java.lang.String message)
throws SexpParseException
SexpParseException
parseURLs
public static java.net.URL[] parseURLs(SexpList l)
throws SexpParseException
SexpParseException