Base64 binary encode a .JPG

I need to take a .JPG that is stored in a table as a <BLOB> and base64 binary encode it.
The reason for doing this is so that I can include it as a single string of text in an XML file.
And I have no idea how to do it!!!
Help me please.
Thanks in advance,
John

Thank you very much for your reply, but this function takes a Raw as its argument, whereas I have a BLOB.
I'll look into breaking the BLOB down into sections, converting it to a Raw and encoding each section one at a time, but I'd prefer to encode the BLOB all in one go, if that is possible.
Any ideas or other pointers?
Cheers,
John

Similar Messages

  • Base64 binary encode a BLOB

    I need to base64 binary encode a BLOB of up to 60k.
    Basically I need a way to base64 binary encode a BLOB and output it to a text file.
    I don't want to use UTL_ENCODE.BASE64_ENCODE(r raw) because breaking my BLOB into RAW size chunks, encoding each chunk and putting the encoded data back together again doesn't work, even if I strip the '=' character(s) off the end of all but the last chunk (they're there because of the way the data at the end of the encoded chunk falls for the bit count).
    Basically I need a way to base64 binary encode a BLOB and output it to a text file.
    The resultant encoded data will often exceed 32,000 characters.
    Thanks in advance.
    John

    This may require a bit of tweaking for use as a Java stored procedure...
    public class Base64Encoder {
    /** Constructor
    public Base64Encoder() {
    public static String base64Encode(String s) {
    ByteArrayOutputStream bOut = new ByteArrayOutputStream();
    Base64OutputStream out = new Base64OutputStream(bOut);
    try {
    out.write(s.getBytes());
    out.flush();
    } catch (IOException ioe) {
    //Something to do if ioe occurs
    return bOut.toString();
    /* BASE64 encoding encodes 3 bytes into 4 characters.
    |11111122|22223333|33444444|
    Each set of 6 bits is encoded according to the
    toBase64 map. If the number of input bytes is not
    a multiple of 3, then the last group of 4 characters
    is padded with one or two = signs. Each output line
    is at most 76 characters.
    class Base64OutputStream extends FilterOutputStream
    {  public Base64OutputStream(OutputStream out)
    {  super(out);
    public void write(int c) throws IOException
    {  inbuf[i] = c;
    i++;
    if (i == 3)
    {  super.write(toBase64[(inbuf[0] & 0xFC) >> 2]);
    super.write(toBase64[((inbuf[0] & 0x03) << 4) |
    ((inbuf[1] & 0xF0) >> 4)]);
    super.write(toBase64[((inbuf[1] & 0x0F) << 2) |
    ((inbuf[2] & 0xC0) >> 6)]);
    super.write(toBase64[inbuf[2] & 0x3F]);
    col += 4;
    i = 0;
    if (col >= 76)
    {  super.write('\n');
    col = 0;
    public void flush() throws IOException
    {  if (i == 1)
    {  super.write(toBase64[(inbuf[0] & 0xFC) >> 2]);
    super.write(toBase64[(inbuf[0] & 0x03) << 4]);
    super.write('=');
    super.write('=');
    else if (i == 2)
    {  super.write(toBase64[(inbuf[0] & 0xFC) >> 2]);
    super.write(toBase64[((inbuf[0] & 0x03) << 4) |
    ((inbuf[1] & 0xF0) >> 4)]);
    super.write(toBase64[(inbuf[1] & 0x0F) << 2]);
    super.write('=');
    private static char[] toBase64 =
    {  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
    'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
    'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
    'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
    'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
    'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
    'w', 'x', 'y', 'z', '0', '1', '2', '3',
    '4', '5', '6', '7', '8', '9', '+', '/'
    private int col = 0;
    private int i = 0;
    private int[] inbuf = new int[3];
    }

  • Binary encoding

    Hi , I am writing an ascii file, how can i binary encode it.
    Thanks.

    Not sure if this is what you are looking for; but this is how I usually create real ascii files. (J2SDK 1.4)
    - Chris
    import java.io.*;
    import java.nio.charset.*;
    import java.nio.*;
    public class Main
      public static void main(String[] args)
        CharsetEncoder asciiEncoder = Charset.forName("US-ASCII").newEncoder();
        String messageToWrite = "Hello World\r\n";
        try
          FileOutputStream os = new FileOutputStream("c:/test.txt");
          os.write(
              asciiEncoder.encode(CharBuffer.wrap(messageToWrite)).array()
          os.close();
        catch (IOException ex)
          ex.printStackTrace();

  • How can I turn off base64 email encoding in iPlanet Process Manager?

    Email sent out from a workflow running in the Process
    Manager seems to be base64 encoded. How can I turn
    off the encoding?

    No worries. Typically you can rename a machine by just changing the name System Preferences -> Sharing. But there is also a command line option to adjust the name, and if you don't use the command line option, the server freaks out and will alert you about the change forever. ie - for servers, you need to use the command I describe below.
    The command is called changeip and can be run from command line in Terminal.app. It is for manually chaning the ip address and or name of a machine. It basically has 4 parameters: old ip address, new ip address, old machine name, new machine name.
    Basically the command looks like this:
    sudo changeip OLDIPADDRESS NEWIPADDRESS OLDNAME NEWNAME
    If any value is being kept the same, just repeat the identical information as both the old and new value.
    Example 1: Changing the IP address and host name. This would update the machine's ip address to be 192.168.1.2 and its name would be update to my_new_name.
    sudo changeip 192.168.1.1 192.168.1.2 my_old_name my_new_name
    Example 2: Keeping the IP address the same but updating the name. This would update the machine's name to my_new_name but would keep the same ip address.
    sudo changeip 192.168.1.1 192.168.1.1 my_old_name my_new_name
    Most likely you're just wanting to update the name, in which case you should follow the second example. If you run this, be sure to reboot the machine afterwards and test to make sure that any enabled services are running properly.

  • Base64 Decoding/Encoding

    We are currently creating a tool for parsing the XML generated by BEA Weblogic 8.1 content repository and creating a directory structure similar to the one in content repository.
    After that we are also creating the reverse process for the above step i.e. creating an XML from the directory structure.
    All is fine till now however when we are trying to import the content to the content repository created as an XML in the second step above the images are not reflecting as the original ones. We have concluded that a possible reason is that the Base64 encoding/decoding that we are using is different from what BEA uses.
    Is there any chance that we can get the jar which us used by BEA for this purpose or if there is any alternative way out please let us know.

    HI,
    Base 64 encoding is a standard 64 character set encoding and decoding where results do not change based on the implementation. So whichever API you choose, it will give you the same results.
    The problem might be somewhere else.
    Thanks
    Vishnu

  • How to set username and password before redirecting to a RESTful webservice

    I am a .Net developer who has developed a webservice used by my ColdFusion colleagues. They are using ColdFusion 9 but I'm not sure if they have incorporated any of the newer features of ColdFusion in their apps. Here is a snippet of how they have been invoking the webmethods:
    <cfscript>
                         ws = CreateObject("webservice", "#qTrim.webServiceName#");
                         ws.setUsername("#qTrim.trimAcct#");
                         ws.setPassword("#qTrim.trimpwd#");
                         wsString=ws.UploadFileCF("#qTrim.webserviceurl#","#objBinaryData#", "#qFiles.Filename#", "Document", "#MetaData#");
                </cfscript>
    As I understand things, the .setUsername and .setPassword correspond to the Windows credentials the CF Admin set when the URL of the .Net webservice was "registered" and given its "name" (for the CreateObject statement above). I have 4 webmethods that are all invoked in this manner and this SOAP protocol works adequately for us. Please note that this ColdFusion web app authenticates anonymous remote internet users by prompting for a username and password and compares them to an application database (i.e. Microsoft calls this "forms authentication"). Because only a few Windows domain accounts are authorized to call this .Net webservice, the above code always uses the same username/password constants and it all works.
    My question involves the newest webmethod added to the .Net webservice. It requires that callers must invoke it as a RESTful service which means it must be invoked by its URL. Here is a snippet of C# code that invokes it from an ASP.NET webclient:
                string r = txtRecordNumber.Text;
                string baseurl = "http://localhost/sdkTrimFileServiceASMX/FileService.asmx/DownloadFileCF?";
                StringBuilder url = new StringBuilder(baseurl);
                url.Append("trimURL="); url.Append(txtFakeURLParm.Text);
                url.Append("&");
                url.Append("TrimRecordNumber="); url.Append(txtRecordNumber.Text);
                Response.Redirect(url.ToString());
    I assume a ColdFusion script could easily build a full URL as above with appended querystring parameters and redirect. Is there some way for the CF code redirecting to a RESTful webservice (by way of its URL) to set the Username and Password to this Windows account mentioned above? When the DownloadFileCF webmethod is hit it must be with the credentials of this special Windows domain account. Can that be set by ColdFusion someway to mimic the result of the SOAP technique (the first snippet above).
    I hope my question is clear and someone can help me make suggestions to my ColdFusion colleagues. Thanks.

    Can you clarify what you mean by "establish a different Windows identity"?  Usually passing identity to a web site or service means adding something to the request's HTTP headers.  This could be a cookie in the case of .NET forms authentication or the "Authorization" header in the case of basic authentication.
    The SOAP web service invocation code you posted does use basic authentication, according to the CF docs "ColdFusion inserts the user name/password string in the authorization request header as a base64 binary encoded string, with a colon separating the user name and password. This method of passing the user name/password is compatible with the HTTP basic authentication mechanism used by web servers."
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec13a13 -7fe0.html
    If you need to mimic the SOAP techinque you should have basic authentication enabled for your REST service endpoints.
    If your authentication method is different then CF developers will need to add the appropriate HTTP headers to their service calls.  Note that calling a REST service from CF would probably be accomplished using the CFHTTP tag if the service is designed to be consumed by the CF server.

  • BODS SOAP Web Service Connection error RUN-248005

    Hi Experts,
    I need help connecting SOAP web service to BODS. We have configured the initial set up by importing the functions from the WSDL that was provided to us. The WSDL provided us with a request and reply schema as follows:
    We then created the data service job that would consume the function call. An overview of the dataflow is as follows:
    When we run the job with null values for the source table the job returns no errors, but returns no data either into the destination table (Which we think is to be expected because we have no parameters to search on). If we add a value to the source table that is a required field for WSDL GET function (sys_ID) the job runs, but produces the error shown below:
    We configured the data flow by using a reference document that can be found at this link: http://www.dwbiconcepts.com/etl/23-etl-bods/158-web-service-call-in-sap-data-services.html.
    Any help in regards to why we are getting a “No response to web service error” would be much appreciated! Also, if further detail is needed please feel free to ask.

    Yes we did make progress. Follow the steps listed below.
    Pre-Configuration
    A WSDL for BODS can be provided from your vendor (Amazon or Twitter) or created in-house.  In my tutorial I will be using ServiceNow.  ServiceNow is a platform-as-a-service (PaaS) provider of IT service management (ITSM) software.
    The WSDL provided should look like this:
               https://<instance>.service-now.com/incident.do?WSDL
    To verify that the WSDL works you can open it in a browser to see the xml schema.  Since the WSDL is HTTPS the browser will prompt you to enter credentials in order to view it.  The username and password will need to be provided to you from vendor you are trying to connect to.
    BODS requires that any web service connection that is https to have a certificate saved to its internal configuration on the job server where the application resides. The certificate is referenced when the call goes out to verify authentication. 
    You can get the server certificate from the vendor who is providing the web service or you can also download the certificate from the browser and save it in base64 binary encoded format to a file and use that.  In my example I will be using Firefox to export.
    if you have fire fox, then on the left side before the URL Address bar there will be a lock icon, click on view certificate, select the details tab, select the *.service- now.com  and click on export, in the dialog box, select the Save as type X.509 Certificate (PEM), you can save this with any name on your machine.
    Now go to the JobServer machine, go to %LINK_DIR%\ext\ folder, open axis2.xml in notepad,
    since it's https uncomment the following tag (transportReceiver)
    <!--transportReceiver name="https" class="axis2_http_receiver">
    <parameter name="port" locked="false">6060</parameter>
    <parameter name="exposeHeaders" locked="true">false</parameter>
    </transportReceiver-->
    it should look line something below
    <transportReceiver name="https" class="axis2_http_receiver">
    <parameter name="port" locked="false">6060</parameter>
    <parameter name="exposeHeaders" locked="true">false</parameter>
    </transportReceiver>
    uncomment the following tag (transportSender) and comment out the parameter KEY_FILE and SSL_PASSPHRASE, enter the complete location of the certificate that you saved from the browser in the SERVER_CERT parameter. you can save the certificate also in this folder
    <!--transportSender name="https" class="axis2_http_sender">
    <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
    <parameter name="xml-declaration" insert="false"/>
    </transportSender>
    <parameter name="SERVER_CERT">/path/to/ca/certificate</parameter>
    <parameter name="KEY_FILE">/path/to/client/certificate/chain/file</parameter>
    <parameter name="SSL_PASSPHRASE">passphrase</parameter>
    -->
    this should look like
    <transportSender name="https" class="axis2_http_sender">
    <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
    <parameter name="xml-declaration" insert="false"/>
    </transportSender>
    <parameter name="SERVER_CERT">enter the certificate path</parameter>
    <!--parameter name="KEY_FILE">/path/to/client/certificate/chain/file</parameter-->
    <!--parameter name="SSL_PASSPHRASE">passphrase</parameter-->
    save this file and open this file is browser to make sure that the XML is valid
    ****How to set up multiple axis files****
    Creating a Datastore
    Select Project -> New- >  Datastore
              Datastore name: Applicable Name
              Datastore Type:  Web Service
              Web Service URL: https://<instance>.service-now.com/incident_list.do?WSDL
              Advance <<
              User name: *****
              Password: ******
              Axis2/c config file path: \Program Files (x86)\Business Objects\BusinessObjects Data           Services\ext\Service_now

  • Decode Base64 and save as binary file

    Hi there,
    I am using Adobe Air 1.5 with JavaScript and want to save a file to my hard
    drive. I get the data from a WebService via SOAP as a Base64 encoded string. A test-string is attached. When I try to decode it with
    the WebKit function "atob()" and try to save this bytes with following code, I can't open the file.
    this.writeFile = function(outputfile, content, append){
    var file =a ir.File.applicationStorageDirectory.resolvePath(outputfile);
    var stream = newa ir.FileStream();
    if (append) {
    stream.open(filea, ir.FileMode.APPEND);
    }else {
    stream.open(filea, ir.FileMode.WRITE);
    try{//Binärdaten
    stream.writeBytes(content0, , content.length);
    }catch(e){//Textdaten
    stream.writeUTFBytes(content);
    stream.close();
    The same happens when I try to open a file from my HDD and read in the bytes. When I decode it to base64, the string is not equal to the string, which is correct.
    I attached a working Base64 string, which I could convert back to a zip-file via a only encoder.
    So my question is, how can I decode a Base64 string and save the binary data to a file?
    Thank you for your help.

    I rewrote the Base64 decoder/encoder to use it with a ByteArray. Here ist the code:
    var byteArrayToBase64 = function(byteArr){
        var base64s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
         var encOut = "";
        var bits;
        var i = 0;
        while(byteArr.length >= i+3){
            bits = (byteArr[i++] & 0xff) << 16 | (byteArr[i++] & 0xff) << 8 | byteArr[i++] & 0xff;
              encOut += base64s.charAt((bits & 0x00fc0000) >> 18) + base64s.charAt((bits & 0x0003f000) >> 12) + base64s.charAt((bits & 0x00000fc0) >> 6) + base64s.charAt((bits & 0x0000003f));
        if(byteArr.length-i > 0 && byteArr.length-i < 3){
            var dual = Boolean(byteArr.length - i - 1);
            bits = ((byteArr[i++] & 0xff) << 16) | (dual ? (byteArr[i] & 0xff) << 8 : 0);
            encOut += base64s.charAt((bits & 0x00fc0000) >> 18) + base64s.charAt((bits & 0x0003f000) >> 12) + (dual ? base64s.charAt((bits & 0x00000fc0) >> 6) : '=') + '=';
        return encOut;
    var base64ToByteArray = function(encStr){
        var base64s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
         var decOut = new air.ByteArray(); 
        var bits;
        for(var i = 0, j = 0; i<encStr.length; i += 4, j += 3){
            bits = (base64s.indexOf(encStr.charAt(i)) & 0xff) <<18 | (base64s.indexOf(encStr.charAt(i +1)) & 0xff) <<12 | (base64s.indexOf(encStr.charAt(i +2)) & 0xff) << 6 | base64s.indexOf(encStr.charAt(i +3)) & 0xff;
            decOut[j+0] = ((bits & 0xff0000) >> 16);
              if(i+4 != encStr.length || encStr.charCodeAt(encStr.length - 2) != 61){
                   decOut[j+1] = ((bits & 0xff00) >> 8);
              if(i+4 != encStr.length || encStr.charCodeAt(encStr.length - 1) != 61){
                   decOut[j+2] = (bits & 0xff);
        return decOut;

  • Encode Bytecode in source field to base64 in target field

    Hello,
    I have already posted a similar question regarding base64 encoding of attachment. However now the bytecode is sent in a single field in the source message. This bytecode has to be encoded in base64.
    So far I have not found any solution to do so. I have read about the following API com.sap.aii.utilxi.base64.api.Base64  which should contain two static methods for encoding end decoding.
    However the package cannot be found when trying to import it into an UDF. As this API is not documented, could it be that it is not available anymore on PI 7.1?
    What other possibilites do I have? Do you have any idea? I
    Thank you very much!

    Hi Florian,
    com.sap.aii.utilxi.base64.api.Base64 is no official API, so there is no official documentation on this. Also, if you use this, there can be a possibility that changes might occur in this class without any notice.
    This class has two static methods:
    String encode(byte[]) // binary -> base64
    byte[] decode(String) // base64 -> binary
    Try looking for this class in aii_utilxi_misc.jar, which can be found on PI server - C:\usr\sap\*\*\j2ee\cluster\server0\bin\ext\com.sap.xi.util.misc
    Hope this helps.
    Regards,
    Neetesh

  • Binary to Voltage Conversion of encoder data on cRio 9073 using FPGA

    I am using FPGA with a cRio 9073 to acquire torque and absolute quadrature encoder values. It says in the FPGA instructions that the documentation for the 9073 should include the binary to voltage conversion, but when I looked at the documentation, it wasn't there. Where can I find the conversion value or function to convert binary encoder data back to voltage? The encoder is hooked up to an analog converter and is acquired with a 9215 AI (+-10V differential). Thanks

    There are individual formulas for one or a group of modules.
    LabView examples path:
    LabVIEW 2010\examples\CompactRIO\Basic IO\Analog Raw Host Calibration\AI Raw Host Calibration
    LabView help topic 
    Converting and Calibrating CompactRIO Analog Input Values (FPGA
    Interface)
    Best regards
    Christian

  • SOAP encoding gzip + base64

    Hi Experts,
    I have a scenario where I have a SOAP receiver that accepts only messages with gzip compact and base64 encoding, in this order. That means I must first compact the message with gzip and then convert this result into base64 encoding.
    I tried to do so using the SOAP default module (XISOAPAdapterBean) with this configuration parameters:
    XMBWS.Encoding = gzip
    XMBWS.TransferEncoding = base64
    XMBWS.XMLEncoding = base64
    When I run that configuration, however, the following error occurs in the processing (viewed via sxmb_moni):
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.UnsupportedEncodingException: base64
    Are the parameters correct?
    Can I see the sequence of the operations (compact and encode)?
    Is there anyway to configure this sequence?
    Any other sugestions?
    Thanks

    Hi,
    After delete the line "XMBWS.XMLEncoding = base64", the server began to return this error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 415 Unsupported Media Type
    I made another test, configuring the parameters according to the guides, like this:
    XMBWS.XMLEncoding = charset iso-8859-1
    XMBWS.TransferEncoding = base64
    XMBWS.Encoding = gzip
    XMBWS.AcceptEncoding = compress, gzip
    But the same error occurs: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 415 Unsupported Media Type
    Is there anyway to check the operations sequence (first compact then encode)?

  • Convert the signed message into base64 code in file receiver adapter

    Hi,
    I have 2 sequence steps in my scenario.
    Step1
    I want to convert the message with signed certifcates and send the file with  base 64 code format.
    Solu:
    1.I deployed the certificate in file adapter (The corresponding key/certificate pair must previously be saved in a keystore view of the J2EE server by using the Visual Administrator)
    2.for to change the File type content to base 64 code format .
    solu:
    File type in receiver communication channel is Binary.
    please suggest what value i need  to provide below
    anonymizer.encoding = ?(using the XMLAnonymizerBean in the module tab giving the value
    Step2.
    after that i wantt to pick up the file with base 64 code format (Which was created in step 1) and place the content to field with xsd type base64 Binary .
    for this we can pick up using file adapte or we need to use any module in the sender file module tab of the communication channel?
    Please suggest.

    HI Hyma,
    As Stefan specifyed already as per my knowledge we dont have any standard procedure for all the requirements you specified.....we need to go for module in the adapter.
    Cheers!!!
    Naveen.

  • How to send binary data in the message body

    How can we send binary data in the message body that is base64 encoded? below are the requirements
    Mime Header.
    Mime-version: 1.0
    Content-Type: application/octet_stream; name=test
    Content-Transfer-Encoding: Base64
    Submission must be named "test.sub" (lowercase)
    Submission must be base64 mime-encoded
    Submission must be sent in the body of the message (not as an attachment)
    Only one submission per mail message
    No other comments should be put in the body of the mail message (other than the submission)
    I highly appreciate your help. If you can provide few examples, that will be very helpfull.
    Thanks,
    Madan

    Use Message.setContent to set the content, or use Message.setDataHandler with
    a DataHandler constructed with a ByteArrayDataSource. If the content is not
    "naturally" encoded in base64, you can enforce it by setting the Content-Transfer-Encoding
    header to "base64". Any reasonable mail reader won't care what encoding you use, as
    long as the decoded data is correct.

  • Re: Base64 Decoder in TOOL requested

    Brendan Duddridge wrote:
    >
    Does anyone have a Base64 decoder written in TOOL? I'm looking for one
    for a project I'm
    working ong.I've enclosed a zip archive with an encoder/decoder class I wrote. This
    is not completely Base64 compliant, but it uses the same algorithm for
    encoding binary data as text. In the Encode and Decode methods, it uses
    the underscore character "_" for padding. Base64 actually uses "=" (the
    equal sign) for this purpose, so you'll need to change this. You'll also
    want to change the last two characters in the ENCODE_ALPHABET constant
    from "$" and "-" to "+" and "/". (Note the comment at the start of the
    Encode method regarding this.) If you need to parse files in MIME
    format, you'll need to do additional work, as well, but that shouldn't
    be too hard. This code, with minor changes, should be able to handle the
    Base64 decoding/encoding for you.
    One major caveat, though. For my purposes, I just wanted to be able to
    serialize a graph of Forte objects into a textual format that could be
    safely embedded into an HTML form field for later retrieval. I wrote
    this class for that purpose, and based it on the Base64 algorithm for
    that. But I haven't really tested it to ensure it really complies with
    Base64. I'm pretty sure it does (with the exception of the 3 characters
    I've changed to avoid using characters that have special meaning on the
    web), but you'll need to test it to make sure. I also don't deal with
    line breaks; it just creates, or decodes, a character stream without
    line breaks, so you'll need to add line break logic if you need to deal
    with MIME format files, or Base64 files with line breaks in them.
    If you have any questions, feel free to ask me.
    Michael Brennan
    Programmer/Analyst
    Amgen Inc.

    Brendan Duddridge wrote:
    >
    Does anyone have a Base64 decoder written in TOOL? I'm looking for one
    for a project I'm
    working ong.I've enclosed a zip archive with an encoder/decoder class I wrote. This
    is not completely Base64 compliant, but it uses the same algorithm for
    encoding binary data as text. In the Encode and Decode methods, it uses
    the underscore character "_" for padding. Base64 actually uses "=" (the
    equal sign) for this purpose, so you'll need to change this. You'll also
    want to change the last two characters in the ENCODE_ALPHABET constant
    from "$" and "-" to "+" and "/". (Note the comment at the start of the
    Encode method regarding this.) If you need to parse files in MIME
    format, you'll need to do additional work, as well, but that shouldn't
    be too hard. This code, with minor changes, should be able to handle the
    Base64 decoding/encoding for you.
    One major caveat, though. For my purposes, I just wanted to be able to
    serialize a graph of Forte objects into a textual format that could be
    safely embedded into an HTML form field for later retrieval. I wrote
    this class for that purpose, and based it on the Base64 algorithm for
    that. But I haven't really tested it to ensure it really complies with
    Base64. I'm pretty sure it does (with the exception of the 3 characters
    I've changed to avoid using characters that have special meaning on the
    web), but you'll need to test it to make sure. I also don't deal with
    line breaks; it just creates, or decodes, a character stream without
    line breaks, so you'll need to add line break logic if you need to deal
    with MIME format files, or Base64 files with line breaks in them.
    If you have any questions, feel free to ask me.
    Michael Brennan
    Programmer/Analyst
    Amgen Inc.

  • Base64-decoding with XI?

    Hi all,
    I have a Webservice which returns a base64-encoded binary stream. This stream contains an UTF-8 encoded XML-Document.
    I want to do a "normal" mapping on this binary-represented XML stream.
    Is it possible with XI 3.0 to:
    1. un-wrap the base64 binary block into the XML that it represents
    2. do a receiver determination based on a part of the XML content that was "rescued" from the binary form
    3. import a schema agains which the unpacked XML stream is checked
    4. map the XML to a different format
    5. wrap the mapped XML in base64-encoding again
    6. stick the base64 block into a SOAP-Parameter and fire it back to SAP
    I know that XI3.0 can do all of the mentioned operations in some contexts. But is it possible to do it in the abovementioned sequence?
    Any answer (including partial ones) would be muchly appreciated.
    Thank you
    Christian

    See: http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/bs64demo8i_sql.txt
    For an example usage see: http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/mailexample8i_sql.txt
    Hope this helps,
    Michiel

Maybe you are looking for

  • Facebook no longer works in settings but the app does

    A couple of months ago, I changed the password for my Facebook account and when I looked on my iPad in Settings and then the Facebook part of the Settings, it now says "There was a problem accessing your account. Please re-enter the password for My N

  • How to create ship to party and sold to party for DC10 during sales order ?

    Hello all: When creating sales order for a material in VA01 with sales Org 1000, distribution channel 10, division 00 The system does not give me any Ship to Party and Sold to Party with the above combination How to create ship to party and sold to p

  • Moving cursor on  multi-record block with pjc components

    Hi, this thread question is updated to a more specific and correct one in the new thread: Need help on using navigation function in when-custom-item-event trigger Please, follow there... I have a pjc on a multi-record block. When I activate the pjc t

  • UFT (QTP 11.5) does not record Chrome

    Hi I have recently installed UFT (QTP11.5) and successfully recorded scripts against a web app running in IE8. However, I have  issues with Firefox and Chrome: Firefox v16: Will record in what appears to be the Terminal mode ie will record mouse clic

  • Export album to keynote?

    Dear Common Wisdom: Can export an iPhoto Album to Keynote? Thanks! Kostas