public static String propertiesEncode(Properties pp){
  ByteArrayOutputStream bos=new ByteArrayOutputStream();
  try {
    pp.store(bos,"adempiere");
  }
 catch (  IOException e) {
    log.log(Level.SEVERE,"store",e);
  }
  String result=new String(bos.toByteArray());
  try {
    result=URLEncoder.encode(result,MobileEnv.ENCODING);
  }
 catch (  UnsupportedEncodingException e) {
    log.log(Level.SEVERE,"encode" + MobileEnv.ENCODING,e);
    String enc=System.getProperty("file.encoding");
    try {
      result=URLEncoder.encode(result,enc);
      log.info("encode: " + enc);
    }
 catch (    Exception ex) {
      log.log(Level.SEVERE,"encode",ex);
    }
  }
  return result;
}

public static String propertiesEncode ( Properties pp ) { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; try { pp . store ( bos , "adempiere" ) ; } catch ( IOException e ) { log . log ( Level . SEVERE , "store" , e ) ; } String result = new String ( bos . toByteArray ( ) ) ; try { result = URLEncoder . encode ( result , MobileEnv . ENCODING ) ; } catch ( UnsupportedEncodingException e ) { log . log ( Level . SEVERE , "encode" + MobileEnv . ENCODING , e ) ; String enc = System . getProperty ( "file.encoding" ) ; try { result = URLEncoder . encode ( result , enc ) ; log . info ( "encode: " + enc ) ; } catch ( Exception ex ) { log . log ( Level . SEVERE , "encode" , ex ) ; } } return result ; }
decode properties into string ( url encoded )
