finished the cross API copy text function
going to do the base 64 conversion a very poor way to match up with the js version
ported two of the conversion functions to java from javascript