| java.lang.Object org.openlaszlo.xml.internal.DataCommon org.openlaszlo.xml.internal.DataCompiler
DataCompiler | public class DataCompiler extends DataCommon (Code) | | Takes XML in various forms, and serializes it to isomorphic actionscript
bytecode.
author: Max Carlson, Henry Minsky version: 1.1 |
Inner Class :static class DCOptions implements Cloneable | |
Method Summary | |
public static InputStream | compile(String x, String headers, int flashVersion, boolean addwrapper, boolean trimWhitespace) | public static InputStream | compile(String x, String headers, int flashVersion, boolean addwrapper, boolean trimWhitespace, boolean compress) | public static InputStream | compile(String x, String headers, int flashVersion, boolean addwrapper, boolean trimWhitespace, boolean compress, boolean nsprefix) | public static InputStream | compile(String x, int flashVersion) | public static InputStream | compile(String x, int flashVersion, boolean nsprefix) | public static InputStream | getSWF(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, int flashVersion, boolean addwrapper) | public static InputStream | getSWF(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, int flashVersion, boolean addwrapper, boolean trimWhitespace, boolean compress, boolean nsprefix) | static String | getStackTrace(Throwable aThrowable) | public static Program | makeProgram(Element data, int flashVersion) | public static Program | makeProgram(Element data, int flashVersion, boolean trimWhitespace, boolean localdata, boolean nsprefix) | public static Program | makeProgram(Element data, DCOptions ioptions) | public static Vector | makeProgram(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, DCOptions ioptions) Produces a JGenerator Flash Program containing
executable SWF codes to build an XML datasource structure which
represents this XML stream. | static void | splitPushString(String text, Program prog) Split string into PUSH chunks of less than 64k, and emit string concat
instructions to re-assemble them. |
FB_INIT_SIZE | static int FB_INIT_SIZE(Code) | | |
MAXFRAME_SIZE | static int MAXFRAME_SIZE(Code) | | |
MISC_BUFSIZ | static int MISC_BUFSIZ(Code) | | global var to hold the image of the stack when splitting frames
|
DataCompiler | public DataCompiler()(Code) | | |
compile | public static InputStream compile(String x, String headers, int flashVersion, boolean addwrapper, boolean trimWhitespace, boolean compress, boolean nsprefix) throws IOException, DataCompilerException(Code) | | Compile XML to SWF
Parameters: x - XML string to compile input streamThe size of the input XML will always be greater than theoutput .swf (possibly plus some factor, to be measured), so we can allocate a FlashBufferwith that max size and be done. |
getSWF | public static InputStream getSWF(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, int flashVersion, boolean addwrapper) throws IOException, XmlPullParserException(Code) | | default trimWhitespace to true, for back compatibility
|
getSWF | public static InputStream getSWF(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, int flashVersion, boolean addwrapper, boolean trimWhitespace, boolean compress, boolean nsprefix) throws IOException, XmlPullParserException(Code) | | Get XML to output stream SWF
Parameters: xpp - an XPP XML parser which points to the XML data Parameters: xppheaders - an XPP XML parser which points to HTTP or other header XML metadata Parameters: flashVersion - 5 or greater Parameters: addwrapper - Set to true if you pass in a separate HTTP headers string Parameters: trimWhitespace - controls whether whitespace is trimmed in text content swf input stream |
makeProgram | public static Program makeProgram(Element data, int flashVersion, boolean trimWhitespace, boolean localdata, boolean nsprefix) throws CompilationError(Code) | | Called for compile-time data, don't do frame splitting, and don't add any resultset wrapper
|
makeProgram | public static Program makeProgram(Element data, DCOptions ioptions) throws CompilationError(Code) | | Called for compile-time data, don't do frame splitting, and don't add any resultset wrapper
|
makeProgram | public static Vector makeProgram(XmlPullParser xpp, XmlPullParser xpheaders, int xmlsize, DCOptions ioptions) throws IOException, XmlPullParserException(Code) | | Produces a JGenerator Flash Program containing
executable SWF codes to build an XML datasource structure which
represents this XML stream.
Splits execution across frames when program buffer becomes too large.
Parameters: xpp - XML XPP parser which is reading from the data content string Vector of one or more (if frame splitting) Flash Programs |
splitPushString | static void splitPushString(String text, Program prog)(Code) | | Split string into PUSH chunks of less than 64k, and emit string concat
instructions to re-assemble them. Leaves string value on stack.
|
Methods inherited from org.openlaszlo.xml.internal.DataCommon | final public static void _pushMergedStringData(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void _pushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void _pushStringData(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void _writeOffset(int o, FlashBuffer fb)(Code)(Java Doc) final public static int addStringConstant(String s, DataContext dc)(Code)(Java Doc) public static int getByteLength(String s, String encoding)(Code)(Java Doc) final public static int getStringIndex(String s, DataContext dc)(Code)(Java Doc) final public static int internString(String s, DataContext dc)(Code)(Java Doc) final public static byte[] makeStringPool(DataContext dc)(Code)(Java Doc) final public static int maybeInternString(String s, DataContext dc)(Code)(Java Doc) public static void printProgram(Program program)(Code)(Java Doc) final public static void pushMergedStringData(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void pushMergedStringDataSymbol(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void pushStringData(String s, FlashBuffer body, DataContext dc)(Code)(Java Doc) final public static void writeFlashData(FlashBuffer body, byte[] data, int destPos)(Code)(Java Doc) final public static void writeOffset(int o, FlashBuffer fb)(Code)(Java Doc)
|
|
|