Converting Base64 encoded String to String object

Hi,
Description:
I have a Base64 encoded string and I am using this API for it,
[ http://ws.apache.org/axis/java/apiDocs/org/apache/axis/encoding/Base64.html]
I am simply trying to convert it to a String object.
Problem:
When I try and write the String, ( which is xml ) as a XMLType to a oracle 9i database I am getting a "Cannot map Unicode to Oracle character." The root problem is because of the conversion of the base64 encoded string to a String object. I noticed that some weird square characters show up at the start of the string after i convert it. It seems like I am not properly converting to a String object. If i change the value of the variable on the fly and delete these little characters at the start, I don't get the uni code error. Just looking for a second thought on this.
Code: Converting Base64 Encoded String to String object
public String decodeToString( String base64String )
    byte[] decodedByteArray = Base64.decode( base64String );
    String decodedString = new String( decodedByteArray, "UTF-8");
}Any suggestions?

To answer bigdaddy's question and clairfy a bit more:
Constraints:
1. Using a integrated 3rd party software that expects a Base64 encoded String and sends back a encoded base64 String.
2. Using JSF
3. Oracle 10g database and storing in a XMLType column.
Steps in process.
1. I submit my base64 encoded String to this 3rd party software.
2. The tool takes the encoded string and renders a output that works correctly. The XML can be modified dynamically using this tool.
3. I have a button that is binded to my jsf backing bean. When that button is clicked, the 3rd party tool sets a backing bean string value with the Base64 String representing the updated XML.
4. On the backend in my jsf backing bean, i attempt to decode it to string value to store in the oracle database as a XML type. Upon converting the byte[] array to a String, i get this conversion issue.
Possibly what is happen is that the tool is sending me a different encoding that is not UTF-8. I thought maybe there was a better way of doing the decoding that i wasn't looking at. I will proceed down that path and look at the possibility that the tool is sending back a different encoding then what it should. I was just looking for input on doing the byte[] decoding.
Thanks for the input though.
Edited by: haju on Apr 9, 2009 8:41 AM

Similar Messages

  • Convert Base64 encoded message into string

    Hello Experts,
    I have an outlook message(text+image) which is encoded in base 64. I need to convert it into string(readable text).
    Do we have any FMs for this conversion.
    Thanks,
    Suman

    [Base64 decoding|http://wiki.sdn.sap.com/wiki/display/Snippets/DecodingBASE64in+ABAP]
    Search SCN first, you just might get lucky.

  • Get canvas.toDataURL('image/jpeg') and convert base64 encoding to java.sql.Blob

    Convert canvas.toDataURL('image/jpeg') to java.sql.Blob.
    I am using oracle adf so I am able to action a backing bean from javascript and pass in parameters as a map. I pass in the canvas.toDataURL('image/jpeg') which I then try to decode in my bean. Using BASE64Decoder and the converting the bytearray to a file I can see the image is corrupted as I can't open the file thus converting the bytearray to blob is also a waste.
    Has anyone any ideas on base64 encoding from canvas.toDataURL to file or Blob?

    Use Case:
    A jsf page that enables a user to take photos using the HTML5 canvas feature - interact with webcam -, take photos and upload to profile
    1. I have created the jsf page with the javascript below; this pops up as a dialog and works okay and onclick an upload image, triggers the snapImage javascript function below and sends the imgURL parameter to the serverside managedbean
    <!-- java script-->
    function snapImage(event){
                    var canvas = AdfPage.PAGE.findComponent('canvas');
                    AdfCustomEvent.queue(event.getSource(),"getCamImage",{imgURL:canvas.toDataURL('image/jpeg'),true);
                    event.cancel();
    <!-- bean -->
    public void getCamImage(ClientEvent ce){
    String url=(String)ce.getAttributes().get("imgURL");
    decodeBase64URLToBlob(url);
    private BlobDomain decodeBaseB4URLToBlob(String url64){
                    BASE64Decoder de=new BASE64Decoder();
                    byte[] bytes=de.decode(url64);
                    File file=new File("abc.jpg");
                    InputStream in = new ByteArrayInputStream(bytes);
                    BufferedImage bImageFromConvert = ImageIO.read(in);
                    in.close();
                    ImageIO.write(bImageFromConvert, "jpg", file);
                    return createBlobDomainFromFile(file);
    ----problem---
    Accessing the generated jpeg file shows the image is corrupted, probably missing bytes or encode/decoder issues.and the blob image after uploading to database is saved as a binary stream which ondownload doesnt render as an image or anything i know of.
    Is there anyways of achieving the conversion without errors?

  • Base64 encoded String

    Is there any support in Java to do base64 encoding on a String (I'm using Java 6)?

    fredrikl wrote:
    Is there any support in Java to do base64 encoding on a String (I'm using Java 6)?Did you do any research?
    [http://www.google.com/search?q=java+base64+example]

  • How to convert a base64 encoded string to binary?

    Hi, gurus,
    I want to convert a base64 encoded string (a image  which is read from a xml file)
    into a normal binary string and then upload to archive link.
    could you pls give me some hints on that?
    br.
    jun

    thank you for your quick reply!
    my real requirement is to extract an image(it 's said it's encoded using base64?) from a xml file and upload it sap archive linke,
    following is the xml content, does that mean i need to convert all the chars in the
    <mime_content> pair to your fm, that will be convert to binary string?
    <MIME_CONTENT xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" href="" xfa:contentType="image/jpg"
    >/9j/4AAQSkZJRgABAAEAYABgAAD//gAfTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMQD/2wCE
    AAgFBgcGBQgHBgcJCAgJDBQNDAsLDBgREg4UHRkeHhwZHBsgJC4nICIrIhscKDYoKy8xMzQzHyY4
    PDgyPC4yMzEBCAkJDAoMFw0NFzEhHCExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEx
    MTExMTExMTExMTExMTExMf/EAaIAAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKCwEAAwEBAQEB
    AQEBAQAAAAAAAAECAwQFBgcICQoLEAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEU
    MoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2Rl
    ZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK
    0tPU1dbX2Nna4eLj5OXm5jp6vHy8/T19vf4foRAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYS
    QVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNU
    VVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5
    usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5jp6vLz9PX29/j5v/AABEIAFQAUwMBEQACEQEDEQH/
    2gAMAwEAAhEDEQA/APf6ACgAoAy/EWsxaLYGZgHmbiKP+8f8BXBjsbHB0ud79EduCwksVU5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RqaeOxND
    SnJ27br7noeVXoU56tHT6fOkQF3qFtBZxoMexEQ/I19NlMZ1aqrVsOo20vd/DqeLXj9inJy8ty
    S18T+H9VaS1s9VsrmQfKYlmALfT1/Cvp6zpV6cqbtK62va/kYyweJoWnODS72M3Urq6ssiK0SzHZ
    gmT/AN9GvgcRisVg3ywoql5pXf8A4E7/AIHoUadOrvLm+f6HMalPLcOWnleRvVmJrznWqVnzVJNv
    zPZowjBWirDvCWoT2OvwRwgslw4jkQdwe/4da9rKK86OIio7S0f9eQswoQq4aTlvHVf15nqNffnx
    QUAFADZESWNo5FDIwIZT0INKUVJWew4txd0eOM7/SvCOtS2cy3Vw5AkjijwoCnplzPQGvj62T0
    4VXzS93ol/mfcYJ18dRU42XRt9/T/gnLXnxL1baU0i3tdLT++ieZL/322f0Arso0aOH/AIUEn33f
    3v8AQ745RSetaTlC5HK6lql/qk3m6jez3UnrNIWx9M9K1lKUt2enSoU6KtTikvIqdKk1N7R/Gf
    iHRlCWWqTSPWMp8yPHptbIrRVJJcu67PU4a2XYavrOCv3Wj+9HQW/xGiuQF1jSEVu81k/ln/vh
    sg/hiuCrgMLV15eVXX/DHE8snT/hT+UtfxWv5np/w0tbC9sf7btWeUSEpEZE2lMcHjJ57V35Vl
    sMO3VbunkfM5xXqxl9XkrW38zta948AKACgAoA8TPWg37a3BrEFvJLZtbrG7oufLZSevoMEc15
    mMhLm5lsfbcO4qmqLot2le/qeU1wH1YUCCgAoAkggluJVit4nlkY4VEUkkwFNKiFKSirydkfS/
    wx0i50PwVYWd9GYrgBpHQ9V3MSAffBFe1h4OFNJn5nm1eGIxc5wd1/kjp63PMCgAoAKAAjIwelAH
    nXxQHVtrOnSXh2kcOpw/MUiUKLgdxgfxeh79Ppx4jDqSvFan0eU5vPDzVOtK8H36f8A8Ijs7mS
    5NtHbytODjylQlsmOteVZ3sfducYx5m1buaF74Y12wtxPeaRewREZ3vAwAvHFW6c4q7Rz08Zhq
    kuWFRNpP4L8MXfinW4rG2V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aGe68Nzardalok1vLhogLWaSVivB7qoXp69aAO0D3h3XrLxaNQ1Xw2jW9
    vocOn5Z0PnSoVy+F9cE8/nQB7BQAUAFABQAUAFABQAUAFABQAUAFAH//2Q==</MIME_CONTENT
    >

  • UIImage to Base64 Encoded String does not matched with PHP Encoded String

    Hi, I have converted an image to base64 string using the following
    UIImage* pic = [UIImage imageNamed:@"closeBtn.png"];
        NSData* pictureData = UIImagePNGRepresentation(pic);
        [Base64 initialize];
        NSString * encodedString = [Base64 encode:pictureData];
    The result obtained by this method and by converting the same image to base64 string in PHP or ASP is different. I am comparing the base64 string (testData) with online generated string from URL http://www.dailycoding.com/Utils/Converter/ImageToBase64.aspx
    Please help ASAP

    Keith:
    I am converting the PNG Image.Actually i want to post a image to PHP server via JSON. for that i am converting the image into base64 string and then sending JSON via HTTP. but when server receives a image data , it cannot convert and save it properl (blank image with 0x0 dimensions). I have compared the Base64 String created from xCode with some online conversion tools. and results are different. I have even tried with JPG images as well.
    How can I get the Same Encoded String as PHP or ASP code can have?

  • Need to Base64 encode a String but How?

    Hi everone:
    I have to Base64 encode and decode a String, but I haven't found any method or API to do it. Does anybody know where to find it? Some ideas about how to?
    Thank you all.
    Jose.

    Hi everone:
    I have to Base64 encode and decode a String, but I
    haven't found any method or API to do it. Does anybodyOh, one thing struck me, why do you need to Base64 encode character data? Normally Base64 is used to encode binary data. If you can represent the bytes as a UTF-8 encoded String, and all components can handle UTF-8, then you should be fine without Base64.
    know where to find it? Some ideas about how to?
    Thank you all.
    Jose.

  • Converting String to an Object of a class

    Hi all,
    I want to convert a string to an object of a class.
    Please see my below code:
    MyClass rahul = null;
    String data = "DATA";
    rahul = (MyClass) data;
    I am getting the error: Invalid cast from java.lang.String to MyClass
    Please help me as its urgent

    There is no magical String deserialization in java. If your class can convert it's state to a string, then you will need to write the reverse parsing code, presumably using either a constructor which takes a string, or a static method similar to how numbers are handled, like:
    MyClass c = MyClass.valueOf(data);Obviously, in either case you will need to write the code to do this.

  • Converting a String to an Object

    Is there some way of converting a String (from a textfield) to an Object? What I want is something similar to the functionality offerred by a JTable. This is because I want the user to be able to input a value of any type to the textfield (e.g. String, int, boolean, etc) and get its object representation ...
    Would a simple cast do ?
    David

    dattard,
    A string is an object, when someone enters something into a JTextField, REGARDLESS of what it is (int, double, string, etc) it is stored in the string text in that text field (JTextField.getText()).
    So if someone enters in "123", its the STRING 123, not the number one hundred and twenty three... to GET the number 123, you'll need to do something like:
    int value = Integer.parseInt( myTextField.getText() );
    to have the string parsed for the value, if you want a double, same idea:
    double value = Double.parseDouble( myTextField.getText() );
    NOTE: The number wrapper classes (Integer, Double, Float, etc.) contain "parseXXXX" methods that allow you to parse a corresponding numeric value out of a String object.
    Also, when a user enters ANYTHING into a text input field of any type, its ALWAYS a String, if you want a different version of what they entered, its up to you to parse it and decide what it was.

  • Converting String to Calendar Object

    Hi,
    I nedd to Change the below String to Calendar Object.i want to show the records which are older than half an hour.any other idea which will solve my problems?
    Fri Aug 17 01:56:40 GMT+05:30 1906
    Thanks in advance.
    Regards:
    Akash.

    Look at
    java.text.SimpleDataFormat

  • String to xml object java

    Hello,
    can anyone suggest me how to convert string to xml object in java?
    I have a string (Data) ant now I have to pass it as parameter as xml object, which structure should be:
    <MGWData>Data</MGWData>
    Where I surf I always see only solutions for converting string to xml document, but never to xml object.
    maybe the problem is I don't completely understand what xml object is in first place :/
    Any answer would help.
    Thanks.

    894871 wrote:
    here is the method to call:
    +/**+
    * Sets the p_DATAXMLTYPEIN value for this SVARCHAR2INSERT_RECEIVESInput.
    *+
    * @param p_DATAXMLTYPEIN
    *public void setP_DATAXMLTYPEIN(com.oracle.xmlns.orawsv.SISTEMA_MOKA.MGW_PUBLIC_FUNCTIONS.SVARCHAR2INSERT_RECEIVESInputP_DATAXMLTYPEIN p_DATAXMLTYPEIN) {*
    this.p_DATAXMLTYPEIN = p_DATAXMLTYPEIN;
    one of the classes contains:
    *public class SVARCHAR2INSERT_RECEIVESInputP_DATAXMLTYPEIN  implements java.io.Serializable, org.apache.axis.encoding.AnyContentType {*
    *private org.apache.axis.message.MessageElement [] _any;*
    this method and some classes where generated using eclipse and wsdl file by creating web service client.
    wsdl says for that part: *<xsd:element name="P_DATA-XMLTYPE-IN">*
    So I suppose it should involve smth org.apache.axis.message.MessageElement. But when I create any type of parameter, it gives me error:
    + ....cannot be cast to com.oracle.xmlns.orawsv.SISTEMA_MOKA.MGW_PUBLIC_FUNCTIONS.SVARCHAR2INSERT_RECEIVESInputP_DATAXMLTYPEIN+
    I am new in web service stuff so thank you for response.Can you explain in plain English what you are trying to do? Or provide a [url http://sscce.org/]SSCE.

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

  • Need to convert a long into a string, please

    hi there
    i need to convert a long into a string. can i just cast it like this:
    (String)longNumber = some function that returns a long;

    Why not just use Long.toString()? If you start with a long value, you can create a Long object and get it's value as a String.

  • How can I convert  an ArrayList to a String[]

    Hi,
    How can I convert an ArrayList (only with strings) to a String[] ?
    I've tried this :
         public static String listToString(List l) {
              StringBuffer sb = new StringBuffer();
              Iterator iter = l.iterator();
              while (iter.hasNext()) {
                   sb.append(iter.next().toString());
                   if (iter.hasNext()) {
                        sb.append(',');
              return sb.toString();
    But what I get is an array of xxxxx@435634 (for example).
    Thanks a lot !

    Strings are Objects but not all Objects are Strings and at least one of the elements in your List is not a String.

  • Converting an int to a string

    i want to know how to convert an int to a string .
    I have tried toString() but it says can't dereference an int.
    any ideas ????
    thanks

    What I mean by the object being null is, say for example, you have the following method:
       public String combine(Object o1, Object o2){
          return o1.toString() + o2.toString();
       }This method will throw a NullPointerException if either or both o1 and/or o2 are null. If you use it like so:
       public String combine(Object o1, Object o2){
          return String.valueOf(o1) + String.valueOf(o2);
       }This will always work. (I know someone out there would say that this would return a String like "nullnull" if both are null, and so forth and so on, but hey, you get my drift.) I'm also not saying the you can't not check if either o1 or o2 is null before proceeding, so the following also works:
       public String combine(Object o1, Object o2){
          String s = null;    // I'm using this instead of StringBuffer for
                              // simplicity's sake so don't get this wrong
          if (o1 != null){
              s = o1.toString();
          if (o2 != null){
              s += o2.toString();
          return s;
       }As you can see, there's no right or wrong way in programming as long as you achieve the result. The only thing that would matter is how clean your code is, how efficient your code is, and how maintainable your code is.

Maybe you are looking for

  • "Auto" sized text reverting 12pt.

    I created a form in Adobe Acrobat Pro 11.0.10. I have one field where the text font is set to Lucinda Sans and font size is set to AUTO. When I send it to my client to fill out the font size goes to 12pt. We are both working on Mac but I'm assuming s

  • Why I don't have face time in my device?

    why I don't have face time in my device?

  • Implementing scheduler

    hi all.i need help on this issue.. this is my web.xml <servlet> <servlet-name>ApplicationService Servlet</servlet-name> <servlet-class>ljt.view.servlet.ApplicationService</servlet-class> <load-on-startup>1</load-on-startup> </servlet> this is my Appl

  • SCCM 2012 OSD Task Sequence Fails "An error occurred while retrieving policy for this computer"

    We have SCCM 2012 R2. I amm trying to start OSD task sequence from bootable media. Hyper-v client gets DHCP ip and starts MDT bootable media, but could not find policy. From F8 I can ping SCCM/DP/MP server. What could be the cause?

  • Table Size Category

    We have a table (FMIFIIT) which has 15,000,000 records.  This table is sized at level 4, which is 40,000 to 160,000 expected records.  Obviously, performance is very slow on this table.  Will increasing this size category speed up performance?  If so