org.directwebremoting.extend
Class ScriptBufferUtil

java.lang.Object
  extended by org.directwebremoting.extend.ScriptBufferUtil

public class ScriptBufferUtil
extends java.lang.Object

A simple utility class to extract a String from a ScriptBuffer.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Method Summary
static java.lang.String createOutput(ScriptBuffer buffer, ConverterManager converterManager)
          Return a string ready for output.
static java.lang.String createOutput(ScriptBuffer script, ConverterManager converterManager, boolean jsonOutput)
          Return a string ready for output.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createOutput

public static java.lang.String createOutput(ScriptBuffer buffer,
                                            ConverterManager converterManager)
                                     throws ConversionException
Return a string ready for output.

Parameters:
buffer - The source of the script data
converterManager - How we convert script variable to Javascript
Returns:
Some Javascript to be eval()ed by a browser.
Throws:
ConversionException - If an error happens during parameter marshalling

createOutput

public static java.lang.String createOutput(ScriptBuffer script,
                                            ConverterManager converterManager,
                                            boolean jsonOutput)
                                     throws ConversionException
Return a string ready for output.

Parameters:
script - The source of the script data
converterManager - How we convert script variable to Javascript
jsonOutput - Are we doing strict JSON output?
Returns:
Some Javascript to be eval()ed by a browser.
Throws:
ConversionException - If an error happens during parameter marshalling

Copyright 2008