com.pingidentity.opentoken.util
Class KeyValueSerializer

java.lang.Object
  extended by com.pingidentity.opentoken.util.KeyValueSerializer

public class KeyValueSerializer
extends Object


Constructor Summary
KeyValueSerializer()
           
 
Method Summary
static String convertListToString(List values)
           
static org.apache.commons.collections.MultiMap deserialize(InputStream s)
           
static org.apache.commons.collections.MultiMap deserialize(Reader r)
           
static org.apache.commons.collections.MultiMap deserialize(String s)
           
static String escapeValue(String value)
          Evaluate a string that will be used as a value and determine if there are characters that need to be escaped.
static String serialize(org.apache.commons.collections.MultiMap values)
          This method is for backward compatibility.
static String serialize(org.apache.commons.collections.MultiMap values, boolean removeTrailingBackslashes)
           
static void serialize(org.apache.commons.collections.MultiMap values, OutputStream os)
          Deprecated. use serialize() method with explicit removeTrailingBackslashes parameter.
static void serialize(org.apache.commons.collections.MultiMap values, OutputStream os, boolean removeTrailingBackslashes)
           
static String unescapeValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyValueSerializer

public KeyValueSerializer()
Method Detail

serialize

public static void serialize(org.apache.commons.collections.MultiMap values,
                             OutputStream os)
                      throws IOException
Deprecated. use serialize() method with explicit removeTrailingBackslashes parameter.

This method is for backward compatibility.

Throws:
IOException

serialize

public static void serialize(org.apache.commons.collections.MultiMap values,
                             OutputStream os,
                             boolean removeTrailingBackslashes)
                      throws IOException
Throws:
IOException

serialize

public static String serialize(org.apache.commons.collections.MultiMap values)
                        throws IOException
This method is for backward compatibility.

Throws:
IOException

serialize

public static String serialize(org.apache.commons.collections.MultiMap values,
                               boolean removeTrailingBackslashes)
                        throws IOException
Throws:
IOException

escapeValue

public static String escapeValue(String value)
Evaluate a string that will be used as a value and determine if there are characters that need to be escaped. As there are multiple characters which may affect the outcome, and we want to minimize (2, worst case) complete string traversals, do a single traversal that checks for each character.

Parameters:
value - to escape
Returns:
escaped string

unescapeValue

public static String unescapeValue(String value)

deserialize

public static org.apache.commons.collections.MultiMap deserialize(String s)
                                                           throws IOException
Throws:
IOException

deserialize

public static org.apache.commons.collections.MultiMap deserialize(InputStream s)
                                                           throws IOException
Throws:
IOException

deserialize

public static org.apache.commons.collections.MultiMap deserialize(Reader r)
                                                           throws IOException
Throws:
IOException

convertListToString

public static String convertListToString(List values)


Copyright © 2012. All Rights Reserved.