Class EncodeUtil

java.lang.Object
net.sf.basedb.util.encode.EncodeUtil

public class EncodeUtil extends Object
Utility functions for encoding/decoding strings.
Since:
2.16
Author:
Nicklas
Last modified
$Date: 2010-09-30 10:53:05 +0200 (to, 30 sep 2010) $
  • Constructor Details

    • EncodeUtil

      public EncodeUtil()
  • Method Details

    • encodeAll

      public static List<String> encodeAll(Collection<String> values, EncoderDecoder encoder)
      Encode all strings in a collection.
      Parameters:
      values - A collection with values that should be encoded
      encoder - The encoder implemenation to use
      Returns:
      A list with the encoded values
    • decodeAll

      public static List<String> decodeAll(Collection<String> values, EncoderDecoder decoder)
      Decode all strings in a collection.
      Parameters:
      values - A collection with values that should be decoded
      decoder - The decoder implemenation to use
      Returns:
      A list with the decoded values
    • encodeAndJoin

      public static String encodeAndJoin(Collection<String> values, EncoderDecoder encoder, String separator, boolean skipNull)
      Encode all strings in a collection and join them into a single string.
      Parameters:
      values - A collection with values that should be encoded
      encoder - The encoder implemenation to use
      separator - The separator string that is inserted between the decoded values
      skipNull - TRUE to skip null values (before and after encoding)
      Returns:
      A string with the encoded values joined together