org.jmol.util

Class Escape

public class Escape extends Object

For defining the state, mostly
Field Summary
static StringESCAPE_SET
static intnEscape
Method Summary
static Stringchop(String s)
static ObjectencapsulateData(String name, Object data)
static Stringescape(Object x)
static Stringescape(Point4f xyzw)
static Stringescape(Tuple3f xyz)
static Stringescape(float[] f)
static Stringescape(float[][] f, boolean addSemi)
static Stringescape(int[] f)
static Stringescape(String str)
static Stringescape(String[] list)
Serialize a simple string-based array as a single string followed by a .split(x) where x is some character not in the string.
static Stringescape(BitSet bs, boolean isAtoms)
static Stringescape(BitSet bs)
static StringescapeColor(int argb)
static StringescapeModelFileNumber(int iv)
static StringfixString(String s)
static StringpackageJSON(String infoType, StringBuffer sb)
static StringpackageJSON(String infoType, String info)
static StringpackageReadable(String infoName, String infoType, StringBuffer sb)
static StringpackageReadable(String infoName, String infoType, String info)
static StringtoJSON(String infoType, Object info)
static StringtoReadable(Object info)
static StringtoReadable(String infoType, Object info)
static BitSetunescapeBitset(String strBitset)
static ObjectunescapePoint(String strPoint)
static Stringunicode(char c)

Field Detail

ESCAPE_SET

static String ESCAPE_SET

nEscape

static int nEscape

Method Detail

chop

private static String chop(String s)

encapsulateData

public static Object encapsulateData(String name, Object data)

escape

public static String escape(Object x)

escape

public static String escape(Point4f xyzw)

escape

public static String escape(Tuple3f xyz)

escape

public static String escape(float[] f)

escape

public static String escape(float[][] f, boolean addSemi)

escape

public static String escape(int[] f)

escape

public static String escape(String str)

escape

public static String escape(String[] list)
Serialize a simple string-based array as a single string followed by a .split(x) where x is some character not in the string. A bit kludgy, but it works.

Parameters: list list of strings to serialize

Returns: serialized array

escape

public static String escape(BitSet bs, boolean isAtoms)

escape

public static String escape(BitSet bs)

escapeColor

public static String escapeColor(int argb)

escapeModelFileNumber

public static String escapeModelFileNumber(int iv)

fixString

private static String fixString(String s)

packageJSON

private static String packageJSON(String infoType, StringBuffer sb)

packageJSON

private static String packageJSON(String infoType, String info)

packageReadable

private static String packageReadable(String infoName, String infoType, StringBuffer sb)

packageReadable

private static String packageReadable(String infoName, String infoType, String info)

toJSON

public static String toJSON(String infoType, Object info)

toReadable

public static String toReadable(Object info)

toReadable

public static String toReadable(String infoType, Object info)

unescapeBitset

public static BitSet unescapeBitset(String strBitset)

unescapePoint

public static Object unescapePoint(String strPoint)

unicode

private static String unicode(char c)