org.eclipse.actf.model.flash.as

## Class ASSerializer

- java.lang.Object
- - org.eclipse.actf.model.flash.as.ASSerializer

    public class ASSerializer
    extends Object

Utility class for serializing Java objects to ActionScript style string.

See Also:
  `ASDeserializer`

### Constructor Summary

Constructors
Constructor and Description
`ASSerializer()`

### Method Summary

Methods
`static String` `serialize(String str)` Escape a given `String`.
`static String` `serialize(String secret, Object[] args)` Serializes a given secret and a given array of objects to the secret followed by a ActionScript style `String`.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ASSerializer

    public ASSerializer()

### Method Detail

#### serialize

    public static String serialize(String str)

Escape a given `String`. Especially it escapes double quotation and back slash characters and convert to ActionScript style String literal by prepending and appending double quotations .

Parameters:
  `str` - A `String` to be escaped
Returns:
  Escaped `String` literal expression

#### serialize

    public static String serialize(String secret,
                   Object[] args)

Serializes a given secret and a given array of objects to the secret followed by a ActionScript style `String`. The secret is used to secure communication between a program use this class and a browser component.

Parameters:
  `secret` - Secret `String`
  `args` - Array of `Object`s
Returns:
  Serialized `String`