How do I convert JAXBElement < byte [] > string or readable format

Hi Experts,

I work on the web service proxy and I want to retrieve data from JAXBElement < byte [] > data type and add data to the table. I have tried with...

Note_c1 JAXBElement < byte [] > = ((RequestEntryC) optyBind) .getNoteC ();

String Note_c = Arrays.toString (Note_c1.getValue ());

But it returns [115, 117, 105, 116, 101, 32, 118, 105] , and [B@27e80064 if I try with Note_c1.getValue () ]


I'm on Jdeveloper 11.1.1.7.1



User, you bet a byte of the Note_c1 array. You can convert this string as

String s = new String (Note_c1.getValue ());

However it is not guaranteed that you can read the string. Only if the bytes represent characters ASCII or UTF-8 you can read.

Timo

Tags: Java

Similar Questions

  • How can I convert videodisplay time into a readable format?

    Hey guys... so I have a video screen that plays... and I need to understand how to format the currentTime and duration in a readable format


    for example: I need to see somehting like this '06:20:30 ' where 06 is hours, 20 is minits and is 30 seconds...

    any ideas?

    any help would be greatly appretiated!

    the code I have is:

    <VideoPlayerSkin>
         <s:VideoDisplay id="videoDisplay" autoPlay="false" width="544" height="306" />
         <s:Group>
         <s:ScrubBar id="scrubBar" liveDragging="true" width="556" left="-6" top="-5" />
         </s:Group>
         <s:Group>
         <s:Label text="{videoDisplay.currentTime} / " top="-277" left="180" />
         <s:Label text="{videoDisplay.duration}" top="-277" left="200" />
         </s:Group>
    </VideoPlayerSkin>
    

    Thanks in advance a ton!

    Hey here's an extract of my code that takes a second value and changes to a days hours minutes seconds format:

    public static void formateDate(totalSeconds:int):void

    {

    var days: int = int(totalSeconds / 86400);
    var hours: int int(totalSeconds / 3600) =-(jours * 24);
    var minutes: int = int(totalSeconds / 60)-(jours * 1440)-(heures * 60).
    var seconds: int = totalSeconds % 60;

    trace(hours+":"+minutes+":"+seconds);

    ...

    After that you can chain however you only need them a piece, but I hope that you can find not pointing in the right direction.

  • How can I convert my view files in pdf format

    How can I convert my view files in pdf format

    Not with Adobe/Acrobat Reader.  You have Acrobat Professional or Standard?

  • How can I convert blob to string xml?

    Hi all

    I need help to read an xml string longer than 4000 in the stored procedure.

    CREATE OR REPLACE PROCEDURE PROD. InsertFDataBlob(V_MYBLOB BLOB) AS

    BEGIN

    ........

    from SYS. XMLTYPE (V_MYBLOB)

    .......

    I couldn't find a simple way to convert my blob value that is V_MYBLOB to varchar. Are my versions of database 10g and 11g.


    Thank you.

    We don't need all this.

    The XMLType object already provides a builder working directly on a BLOB.
    Just pass the ID of the set of characters in addition to the binary content:

    For example, if the content is encoded in UTF - 8:

    ...
    passing xmltype(V_MYBLOB, nls_charset_id('AL32UTF8'))
    ...
    

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25788/t_xml.htm#i1009842

  • How do CabArc or record MakeCab strings in unicode format

    Hello, I'm unable to make an archive of files, whose names must be in unicode format. I'm following on to the task of making the actual cab file, but after extraction, some of the characters used in the file names are replaced with characters from the regional series. My question is: is it possible to save the path of files (and file names) to be extracted in Unicode, so after extraction, they will keep their original name?

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • I9 stature and convert the video in a readable format

    Does anyone know of a good free video converter for the i9? I have some converters on my PC that allows you to convert video to mp4 and I used iTunes to convert also... but I add the video to convert mp4 to my i9 phone says he can't play it every time.

    I would also maybe look at a paid version of any video converter offered by motorola, if there are those who support the i9

    pac_80-

    Looking for a converter that changes the file in .3gp format which is the standard of Mobile video.

    Mark

    Support Forums Manager

  • How do you mass convert photo shop pictures in JPEG format?

    How to mass convert photo shop pictures in JPEG format?

    If you have the full version of Photoshop, you can use the image processor on the file menu.

    It will create a new subfolder called jpg and place all JPEGs new in this file, leaving only the originals.

  • How to convert a single byte String?

    Purpose:

    Show a result byte on the BB 9900 screen.

    Question:

    How to convert a single byte String?

    Part of the code:

    byte value = con.cpu_config.elementAt (i)

    stop here

    String valuestring = new String (value);

    _rtf. SetText (valueString);

    If you know how to fix it, please share your idea.

    Thank you for your attention,

    String valuestring = new String (new byte [] {value}};)

    _data. Append (valueString);

    _rtf. SetText (_data.toSrting ());

    Solve it.

  • converting a hexadecimal string to withh on ascii bytes

    How to convert a hexadecimal string of numbers of bytes without ascii codes, then all the octets converted is expected to come in a package

    Your question is very ambiguous. Please explain.

    Can you give us a Vi containing an example of string and what you want out of it. What is the dataype 'packets '?

  • Convert a hexadecimal string to byte array

    Hello

    I would like to convert a hexadecimal string (e.g. 0x156FD18A4) into an array of bytes, the problem is that I don't have any delimiter (for example 15 6F 8 a 4 D1) so I can't use the worksheet to an array of strings, I tried to do something on my own, but everything seems to be too complicated is there an appropriate way clean and neat to achieve what I want? (or maybe a clever trick to add delimiter every two characters in my original string)

    Thank you!


  • How to convert int to String

    How to convert int to String. I get the error 'cannot convert integer to int.

    Dim str As String = "abc";

    int NB = Integer.valueOf (str);

    Use Integar.parseInt (). But make sure your str contains the integer value (like str = '123') otherwise you will get the exception.

    String str = "123"; int num = Integer.parseInt(str);
    

    Concerning

    Bika

  • Convert integer to string and show two numbers

    Hello

    How can I convert an integer to a string?

    StationGlobals.MyInteger is 1.

    With the help of Str (StationGlobals.MyInteger) must convert to "01" instead of only 1.

    How is that possible?

    THX

    Thanks for the screenshot.

    I took the format string "%.2i" in my function str() and now have numbers here too 2.

  • Convert number to string in function, spell training?

    I saw a few posts asking how to convert a hexadecimal string to a number, but I saw nothing in regard to going the other way - how to convert a new number into a hexadecimal string. Can TestStand convert a number to a hexadecimal string in a function?

    Here's what I'm trying to do (Locals.CryTuneHex is a string containing a hexadecimal value represented and Locals.Freq_Meas is a digital):

    Locals.CryTuneHex = Val ("0 x" + Locals.CryTuneHex) + round (((320000 - Locals.Freq_Meas)/0.065),4)

    or in simpler terms:

    Locals.HexString = Locals.DecimalNumber

    I need to convert the right side of the equation (which is a decimal number) to a hexadecimal string in order to to store in the string variable on the left side of the equation. Is this possible? In my view, there are a Str() operator to convert to a string, but I need in hex, not only a string representation of the decimal number.

    Thank you!

    Pass a format to Str, like the people of the country. HexString = str (Locals.Number, "%x")

    To play with format strings, create a local number, right-click and select the Digital Format, and then select Hex to Type and watch how the format string varies when you change options.

  • How let labview to check the string is in Scientific Notation.

    Hey all,.

    I want to labview to convert a worksheet string in a table. It's easy using the tool 'chain of worksheet to the table '. The only problem I have is that I get the string from a RS232 device and the critical moment arrives.

    Example:

    If I read the data from the buffer it gives me:

    1.50337800E + 00 + 1.70316300E + 00 for both channels, it is converted and accepted

    If there is a slight delay, I get:

    + 1.50337800E + 00 + 1.70316

    It is also accepted because + 1.70316 is also recognized as a number.

    How can program labview to check each number he reads is according to Scientific Notation?

    Thank you

    This regex seems to work for me, for all cases, I've tried:

    [+/-]\d+\.\d+[Ee][+/-]\d+

    Note that it is very restrictive and only follows the shape of ±n.nnnE±mm

  • Converts a hexadecimal string to ASCII by VBAI

    Good day, experts, OR the

    I would like to ask for help on the stage of the VBAI calculator. Is there a way I could convert a hexadecimal string to ASCII character? For example 25 (Hex) to %(ASCII) or, if not in the calculator to other methods? I'll have to send data via TCP/IP later.

    Thank you very much
    Andrei K.

    Now I understand what you want. You can actually do from TCP step. First of all, you need get the length of the string in a digital as you did in step of the calculator, but then you can send this digital as a hexadecimal string of ascii to TCP step. To do this, have the length of the string as a numeric result in the return of calculator. In the TCP step, add a "Write" command and insert a result. Select the digital output of the step of the calculator and U8 of the data format. You can use the display/Hex Normal display to view the data that will be sent, and when displaying normal view, you can see that it is a '%' value when length is 37. See the attached screenshot to see how I did it.

    Hope this helps,

    Brad

Maybe you are looking for

  • cDAQ measurement problems

    I'm new to LabVIEW and OR products, please bear with me. Material used: 1 x cDAQ-9188 input NI 9208 2 modules Software: The latest version of LabVIEW Windows 7 (64-bit) Currently, I'm having a problem getting a high enough sampling rate. My VI is jus

  • 'main' arguments when starting program - how does communicate requests for file to Windows programs?

    Someone know what Windows up or sends to a program when it is first started? I don't know yet what to look under. In particular, if I double click on a document (say a data file that I generated with my LabWindows/CVI program) and I have my default p

  • attachments using windows media player

    I can't video messages with windows media player, who of attachments with outlook express e-mails. If my email address has a video attachment GoGear accelerated, I can view the video accessory with no problems. However, 99 percent of my e-mails with

  • Rhapsody WMP + microSD use

    Beginner with several questions: I use Rhapsody-to-Go to synchronize my 4GB fuse and added a 4 GB microSD card. Can I use an adapter to plug the microSD directly to a computer and add songs to help drag / move, or it will mess up the timing of Rhapso

  • my windows mail stop receiving mail - but I can send - last to enter was 18/07/11

    I went from quest to comcast feb.11 - everything was going well until 18/07/11