JBIDE-14362 CordovaSim: implementing 'encode' method of Phonegap's Barcode Scanner plugin