public static String decodeString(Codec codec, String s)
    throws Codec.CannotDecodeException {
    """
	Decodes the string using the codec provided. Returns a string
	
	@param codec encode the string
	@param s the string to encode
	@return the encoded string
	@throws Codec.CannotDecodeException if cannot decode the string
    """
    try
    {
      return new String(codec.decode(s), "UTF-8");
    }
    catch(UnsupportedEncodingException ex)
    {
      // shouldn't happen
      throw new RuntimeException(ex);
    }
  }
public static String decodeString(Codec codec, String s)
    throws Codec.CannotDecodeException
  {
    try
    {
      return new String(codec.decode(s), "UTF-8");
    }
    catch(UnsupportedEncodingException ex)
    {
      // shouldn't happen
      throw new RuntimeException(ex);
    }
  }
public static String decodeString ( Codec codec , String s ) throws Codec . CannotDecodeException { try { return new String ( codec . decode ( s ) , "UTF-8" ) ; } catch ( UnsupportedEncodingException ex ) { // shouldn't happen throw new RuntimeException ( ex ) ; } }
Decodes the string using the codec provided. Returns a string

@param codec encode the string
@param s the string to encode
@return the encoded string
@throws Codec.CannotDecodeException if cannot decode the string
Decodes the string using the codec provided . Returns a string