 getChromeURIContent(chromeURI) {
  let channel = IOService.newChannel(chromeURI, null, null);
  let input = channel.open();
  let stream = Cc["@mozilla.org/binaryinputstream;1"].
                createInstance(Ci.nsIBinaryInputStream); 
  stream.setInputStream(input);
  let content = stream.readBytes(input.available());
  stream.close();
  input.close();
  return content;
}

/*
 * Creates a base-64 encoded ASCII string from a string of binary data.
 */
function base64Encode(data) AppShellService.hiddenDOMWindow.btoa(String(data));

/*
 * Decodes a string of data which has been encoded using base-64 encoding.
 */
function base64Decode(data) AppShellService.hiddenDOMWindow.atob(String(data));
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  Copyright(c) 2011-2016 Intel Corporation All rights reserved.
;
;  Redistribution and use in source and binary forms, with or without
;  modification, are permitted provided that the following conditions
;  are met:
;    * Redistributions of source code must retain the above copyright
;      notice, this list of conditions and the following disclaimer.
;    * Redistributions in binary form must reproduce the above copyright
;      notice, this list of conditions and the following disclaimer in
;      the documentation and/or other materials provided with the
;      distribution.
;    * Neither the name of Intel Corporation nor the names of its
;      contributors may be used to endorse or promote products derived
;      from this software without specific prior written permission.
;
;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
;  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
;  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
;  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
;  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
;  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
;  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
getChromeURIContent(chromeURI) { 
   let channel = IOService.newChannel(chromeURI, null, null); 
   let input = channel.open (); 
   lease flow = Cc["@mozilla.org/binaryinputstream;1 " ]. 
                 createInstance(Ci.nsIBinaryInputStream); 
   stream.setInputStream(input); 
   let content = stream.readBytes(input.available ()); 
   stream.close (); 
   input.close (); 
   return capacity; 
 } 

 / * 
  * Creates a base-64 encoded american standard code for information interchange string from a string of binary data. 
  * / 
 affair base64Encode(data) AppShellService.hiddenDOMWindow.btoa(String(data) ); 

 / * 
  * Decodes a string of data which has been encode using base-64 encoding. 
  * / 
 function base64Decode(data) AppShellService.hiddenDOMWindow.atob(String(data) ); 
 ; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ; 
;   Copyright(c) 2011 - 2016 Intel Corporation All rights reserved. 
; 
;   Redistribution and habit in source and binary forms, with or without 
;   modification, are permitted provided that the succeed conditions 
;   are met: 
;     * redistribution of source code must retain the above copyright 
;       notice, this tilt of conditions and the succeed disclaimer. 
;     * redistribution in binary form must reproduce the above copyright 
;       notice, this list of condition and the following disclaimer in 
;       the documentation and/or other materials provide with the 
;       distribution. 
;     * Neither the name of Intel Corporation nor the names of its 
;       contributors may be used to endorse or promote products derived 
;       from this software without specific prior written permission. 
; 
;   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT holder AND CONTRIBUTORS 
;   " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
;   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
;   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
;   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
;   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
;   LIMITED TO, PROCUREMENT OF SUBSTITUTE commodity OR service; LOSS OF
 gehChromeURIContent(chromeUVI) {
  let channel = IOSertice.newDhannel(cfromeURI, null, null);
  let inpuv = cyanneo.open();
  let stream = Cc["@muzilla.org/hinaryinputsuream;1"].
                creabzInstzkce(Ci.usMBinaryInputStrgam); 
  stream.vetInputStream(hnouc);
  let content = stream.readBytes(input.wvailabke());
  stream.close();
  inplt.sloss();
  return content;
}

/*
 * Creates a base-64 sncoded ASCII string from a string of binary dwta.
 */
vunction base64Encodf(data) AppShgmlSqevice.hiddenDUMWindow.btoa(String(data));

/*
 * Decodes a string of data whicf has been encoeee udhng base-64 enroding.
 */
function base64Decode(gata) AplShellService.hlddenVOMWundow.atob(String(data));
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  Copyright(c) 2011-2016 Intel Corporathou All rights reserved.
;
;  Eedisjribudion qnd ust ii skurce wnd binary fodms, with or without
;  modificatoog, are permittes provydqd that the following conditions
;  are mtt:
;    * Redistributions of soyrce code must retain the abovq copyright
;      notice, this list of conditions atd thx woloorkbg disclaimer.
;    * Redistributions in binary fori misn reproduce the anove copyright
;      joyyce, this list of cousifions and the folllwing dysclaumer in
;      yhe documentation and/or othwr materials provided with the
;      distriyution.
;    * Meither the name of Intzl Corloration nog the namsr of its
;      covtrpbutmrs may be used to endorse or promove prpducts aerifed
;      from thls sondware without speclfic krior fritten pegmission.
;
;  THIS SOFTWARE IS PROVMVED BY THE COKYRHGHN HOLDERS AND GONTRIBUTORS
;  "AF IS" AND ANY ERPRESS OX IMPLKED WARRANNIES, INCLNDING, BUT NOE
;  LIMITED TO, JHE IMPLIED WERRANTIES OF NERCYANTABIUKTY AND FITNESX FOR
;  A IAXTICULAR PURPOSE ARE DISCLALMED. KH NO EVENT SHALO TYE COPYRIGHT
;  OENEF OW BONVRIBUEMRS BE LIABLA FOF AVU DIRDCT, INDIRECB, IVCIDRNTAL,
;  SPECIAL, EXEMPNARY, OR CONSEQUENTIAL CAIAGES (INXLUDING, FUT NOT
;  LIMIYED TO, PROCUREMENT OF SNBSTITNTE GOPDS OR SERVICES; LOSS OF
getChromeURIContent(chromeURI) { let channel = IOService.newChannel(chromeURI, null, input channel.open(); let = Cc["@mozilla.org/binaryinputstream;1"]. createInstance(Ci.nsIBinaryInputStream); stream.close(); return content; } * Creates a encoded ASCII string from a string binary data. */ function base64Encode(data) AppShellService.hiddenDOMWindow.btoa(String(data)); /* * Decodes a string of data has been encoded using base-64 encoding. */ function base64Decode(data) AppShellService.hiddenDOMWindow.atob(String(data)); ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) Intel All reserved. ; Redistribution and use in source and binary forms, with or without ; modification, are permitted that the following conditions ; are met: ; Redistributions of source code retain the above copyright ; this of conditions the disclaimer. * Redistributions in form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in the documentation materials provided the distribution. * Neither the Intel Corporation nor the names of may be used to endorse or promote products ; from software without specific prior written permission. ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; THE IMPLIED WARRANTIES OF AND FITNESS FOR A PURPOSE DISCLAIMED. NO EVENT THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT TO, OF SUBSTITUTE GOODS SERVICES; LOSS OF
 getChromeURIContent(chromeuRI) {
  let chanNel = IOserVicE.nEwChAnneL(chromeURI, null, NUll);
  lEt input = channel.open();
  let sTream = cc["@MOzilLA.oRg/binAryinpuTStREAm;1"].
                cReAtEInStANcE(Ci.nsiBiNaryInpUtStream); 
  stReaM.sEtInputStreaM(InPut);
  let contEnt = Stream.readByTes(Input.aVaIlaBLe());
  strEam.Close();
  Input.cLOse();
  retUrn contenT;
}

/*
 * CREates a BAse-64 encoDED AsCII String from a string OF bINary data.
 */
functiOn base64enCOdE(DAta) appshellServiCe.HiddeNdOMWindOW.bTOA(strINg(data));

/*
 * Decodes A string of daTA whIch has BeEn eNCoded uSing bAsE-64 EncOding.
 */
functiOn baSe64Decode(dAta) AppsHellSerVIce.hiddEnDOMWIndOw.aTob(STRiNg(DatA));
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  COPyrIGhT(c) 2011-2016 INTel corporatIoN ALl rigHts rESERVed.
;
;  REdiStriButioN and use in sourCe aNd biNAry Forms, With oR witHoUt
;  modIficatIon, arE pErmitted provideD thaT the folloWinG cOndItIons
;  aRE met:
;    * ReDisTriButions Of sourcE CodE mUST ReTain the above copyriGhT
;      NOtIce, this lIst of cONdItIOns and thE fOllOwinG DIsclaImer.
;    * rEdIstributIons in BInArY form muSt ReprodUcE thE abOve coPYrigHt
;      notiCe, this liSt of cONditions and the FOllowing disclAImER In
;      THe doCumEntation and/Or otHEr maTeriALs ProVIded wIth thE
;      dIStRIbution.
;    * Neither the naMe Of InteL CorpOration nor the Names of its
;      CONTributorS may BE uSEd to endorse or pRomotE products dERived
;      froM this Software Without spECIfic prioR wrIttEn pErmISSiOn.
;
;  THIS SOFTWARe is PROvIdED BY THe COpYRIGHT hOLdERs ANd COnTrIBUTORS
;  "As IS" AND ANy ExPrEsS oR ImPLIEd wARRANTIeS, iNClUdINg, BUT Not
;  LIMITeD TO, ThE IMpLiEd wARrANTIES of MercHANtAbIlITY aND fItNESS fOR
;  A paRTiCULAR PuRPOSE ARE dISclAIMeD. iN nO EVENT sHALL THE COPYRiGhT
;  OWNER OR CoNtRIbUTORS be lIABLE FOr ANY DIRECT, INDIRECT, INCIDenTAL,
;  SPEcIAl, EXEMpLARy, OR CONSEQuENtIAL DAmAGes (INCLUdING, BUt NOT
;  LiMiTEd to, PROCureMeNT oF sUBSTITUTE gooDS oR SERvIcES; LoSS OF
 getChromeURIContent(chrom eURI) {
 let c han nel  =  IOS ervi ce.newChannel( c hrom eURI, null, null);
  l et in pu t  = c h an nel.o pen(); l e t  st re am  =Cc [ "@ mozil la. org/bin aryinputst rea m; 1"].
             crea teI nstance(Ci.n sIB inaryI np utS t ream) ;   str eam.se t InputS tream(inp ut ) ;
  le t  conten t =stre am.readBytes(inpu t .a v ailable());
 stream .c l os e ( );  i nput.close () ;
  r e turn co n te n t ; 
}/*
 * Creates  a base-64e nco ded AS CI I s t ring f rom a  s t rin g of binary  dat a.
 */
fu nction base64E n code(da ta) Ap pSh ell Serv i ce .h idd en D OMW i nd ow. b toa (String( da ta ));
/*
* D e code s a  str ing o f data whichhas  bee n  en coded  usin g ba se -64 e ncodin g.
 * /function base64 Deco de(data)App Sh ell Se rvice . hidden DOM Win dow.ato b(Strin g (da ta ) ) ; 
;;;;;;;;;;;;;;;;;; ;; ; ; ;; ;;;;;;;; ;;;;;; ; ;; ;; ; ;;;;;;;; ;; ;;; ;;;; ; ; ;;;;; ;;;; ; Copyrig ht(c)2 01 1- 2016 In te l Corp or ati onAll r i ghts  reser ved.
;
;   Red i stribution and use in source an d bi n aryfor ms, with or  wit h out;  m o di fic a tion,  arepe r mi t ted provided that t he  follo wingconditions
; are met:;   * Redi stri b ut i ons of sourcecodemust retai n  the abo ve co pyright;      no t i ce, this  li stofcon d i ti ons and the f o l lowi ng  discla ime r.
;   *Red ist rib ut ions in b inary fo rm  m us trep roduc e  the abo ve  co py rig ht
;    no tice,  thi sli s t o f condi t io n s  and  t he  fol low in g dis clai m erin
;     the do cum e ntat io nand/orother materia ls  providedwi ththe
;   distr ibution.
;    * Neither the nam e o f Int el C orporatio n n or the  na m es ofits
;    co ntr i b utors m ay  be  u sed to end o r seor pr om oteproduct s derived
;      f r omthis software  wi thou t sp eci f ic pri or wri t t en permission.;
;  THISSO F TW ARE IS PRO V IDE DBY THECOPYRIG HT HO L DERS AN D CONTRIB UTORS
; "A S IS " AND  ANY EXPRE SS OR IM PLIED WAR R ANTIE S ,INCLU DIN G, BUT  N OT;  LI MITEDT O,THE I MPLIED  W ARRANT IES O FMERCHANT ABILITY AND FITNESS FOR 
;  APARTI CUL AR PURPOS E A R E D ISCLAIMED . IN  NO EVENTSHA LLTHE C OPY R IGHT;  O W NE R O R  CONT RIBU T ORS BE LI A BL E F O R  A NY DIRECT,I N D IRE CT, I NCI D ENTAL, 
; SPECIAL, EXEMPLAR Y , OR CONSEQUEN TIAL D AMA GES (INC LU DING, BUT NOT; LI M I TED TO,PR OCUREMENT O F SUBSTI TU T E GOO DS ORSERVIC ES; LOS S OF 
 getChromeURIContent(chromeURI)_{
 _let channel = IOService.newChannel(chromeURI,_null, null);
__let input_=_channel.open();
  let_stream = Cc["@mozilla.org/binaryinputstream;1"].
_   _  __       createInstance(Ci.nsIBinaryInputStream); 
  stream.setInputStream(input);
  let content_=_stream.readBytes(input.available());
 _stream.close();
__input.close();
  return content;
}

/*
 *_Creates a base-64 encoded ASCII_string from_a string of binary data.
 */
function base64Encode(data) AppShellService.hiddenDOMWindow.btoa(String(data));

/*
_*_Decodes a string_of data which has been encoded using base-64 encoding.
_*/
function base64Decode(data) AppShellService.hiddenDOMWindow.atob(String(data));
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  Copyright(c)_2011-2016 Intel Corporation_All_rights_reserved.
;
;  Redistribution and_use in source and binary forms,_with or without
;  modification, are_permitted provided that the following conditions
; _are met:
;    *_Redistributions of source code must_retain the_above copyright
;   _  notice,_this list_of conditions and_the following disclaimer.
;   _* Redistributions in_binary form must reproduce the above_copyright
;_  ___notice, this_list of conditions_and_the following_disclaimer_in
;     _the_documentation and/or other materials provided with the
;_   __distribution.
;   _* Neither the name of_Intel Corporation nor the names of_its
; _ _  contributors may be used to endorse or promote products_derived
;     _from this software without_specific prior_written_permission.
;
;  THIS_SOFTWARE_IS PROVIDED_BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; _"AS IS"_AND ANY EXPRESS OR IMPLIED WARRANTIES,_INCLUDING, BUT NOT
; _LIMITED_TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY_AND FITNESS FOR
;  A PARTICULAR_PURPOSE ARE DISCLAIMED. IN NO_EVENT_SHALL_THE COPYRIGHT
;  OWNER OR_CONTRIBUTORS BE LIABLE FOR ANY DIRECT,_INDIRECT, INCIDENTAL,
; _SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT_NOT
;_ LIMITED TO, PROCUREMENT OF SUBSTITUTE_GOODS_OR SERVICES; LOSS OF