Tuesday, February 2, 2010

Jave Base64 Decoder for decoding Opaque data

Use the following java code to decode opaque data. Very useful if you are capturing the rejected messages as opaque data and want to translate the data:

String input = (String)getVariableData("OpaqueString");          
Base64Decoder Decoder = new Base64Decoder();         
         
         
try                  
{                  
String decoded = Base64Decoder.decode(input);                    
 setVariableData("ErrorPayload",decoded);                   
}                  
catch(UnsupportedEncodingException uee)                  
{                  
uee.printStackTrace();                   
}

No comments: