public static Properties propertiesDecode(String data){
  String result=null;
  try {
    result=URLDecoder.decode(data,MobileEnv.ENCODING);
  }
 catch (  UnsupportedEncodingException e) {
    log.log(Level.SEVERE,"decode" + MobileEnv.ENCODING,e);
    String enc=System.getProperty("file.encoding");
    try {
      result=URLEncoder.encode(data,enc);
      log.log(Level.SEVERE,"decode: " + enc);
    }
 catch (    Exception ex) {
      log.log(Level.SEVERE,"decode",ex);
    }
  }
  ByteArrayInputStream bis=new ByteArrayInputStream(result.getBytes());
  Properties pp=new Properties();
  try {
    pp.load(bis);
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"load",e);
  }
  return pp;
}

public static Properties propertiesDecode ( String data ) { String result = null ; try { result = URLDecoder . decode ( data , MobileEnv . ENCODING ) ; } catch ( UnsupportedEncodingException e ) { log . log ( Level . SEVERE , "decode" + MobileEnv . ENCODING , e ) ; String enc = System . getProperty ( "file.encoding" ) ; try { result = URLEncoder . encode ( data , enc ) ; log . log ( Level . SEVERE , "decode: " + enc ) ; } catch ( Exception ex ) { log . log ( Level . SEVERE , "decode" , ex ) ; } } ByteArrayInputStream bis = new ByteArrayInputStream ( result . getBytes ( ) ) ; Properties pp = new Properties ( ) ; try { pp . load ( bis ) ; } catch ( IOException e ) { log . log ( Level . SEVERE , "load" , e ) ; } return pp ; }
decode data string ( url encoded ) into properties
