How to Convert Binary Data in Binary File

hi,
my telecom client puts a binary file which is asn.1 encoded with BER.
how to handle binary data in java.
how to convert binary to hexa to ascii format
how to convert binary to octet to ascii format
please help me in this.
regards,
s.mohamed asif

You don't need to convert the data.
Only you can do is print it in that formats, like it:
public static String byteArrayToHex(byte[] b) {
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < b.length; i++)
         sb.append(Integer.toHexString(b&255) + " ");
return sb.toString();
take a look at this
http://java.sun.com/docs/books/tutorial/essential/io/

Similar Messages

  • How to convert numeric data to binary decimal in java

    How to convert numeric data to binary decimal in java Pleas egive me code example

    There is no numeric data. It's all binary. If you're talking about Strings, look at the Integer class.

  • How to convert XML data into binary data (opaque data)

    Hi,
    I am trying to develop a process that delivers files after reading data from a database.
    However, it is required not to deliver the data immediately. We want to perform some checks before the files get written.
    So the way we want to design this is,
    1. Read data from database (or any other input). The data is in XML format (this is a requirement, as in general, we have xml data)
    2. This data is written, opaquely, to a JMS queue that can store binary data, along with what is the filename of the file that would be written (filename is passed using JMS Headers)
    3. When required, another process reads the JMS queue's binary data, and dumps into a file
    The reason I want to use opaque data while inserting in the JMS queue is, that enables me to develop a single process in Step 3 that can write any file, irrespective of the format.
    My questions are
    1. How to convert the xml data to opaque data. In BPEL I may use a embedded java, but how about ESB. Any other way....?
    2. how to pass filename to the jms queue, when payload is opaque. Can I use a header attribute...custom attributes?
    3. Which jms message type is better for this kind of requirement - SYS.AQ$_JMS_BYTES_MESSAGE or SYS.AQ$_JMS_STREAM_MESSAGE

    Ana,
    We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
    Let me know if this helps.

  • How to convert raw data to wav files??

    Hi AnyOne,
    Can anyone know how to do convert raw data in hex format into wav file format??
    Please show some guideline.
    Thank You.

    Hi Craig,
    Thanks for the reply.
    I do follow according the the wav creation standard and save it as wav file. However, i still fail to read back the wav file.
    I using LV8.2. Attach with my testvi and data. Please guide if i make any mistake in my testvi
    Thx and Regards,
    Simon76     
    Attachments:
    data.txt ‏7 KB
    testvi.JPG ‏39 KB
    header.txt ‏1 KB

  • How to convert SAPScript data to Excel file

    Hi Experts,
    Curenntly I am converting SAP Script data to PDF file and send an e-mail with attachment (PDF file).
    Same like this, is that possible to covert thda Script data to Excel file to send mail with attachment.???
    If, yes please sugget with respective Function Modules.
    Thanks In Advance.
    Best Regards.

    Hi,
    Thanks for response, Here providing more inforamation.
    Presently my report displaying Customer information. As per user requirement, coverting the Script data to PDF by using
    CALL FUNCTION 'CONVERT_OTF_MEMORY'
              EXPORTING
                format                = 'PDF'
                max_linewidth         = 132
              IMPORTING
                bin_filesize          = doc_size
              TABLES
                lines                 = htline.
    Now user want to add two radiobuttons on selection screen for PSF file & Excel file
    If user seleacts Excel fiel radio button, then I need to covert the SAP Script data to Excel file lik I have done for PDF.
    I'd like to know is that possible covert the Script data to Excel file. If yes, suggest with FMs or process.
    Best Regards.

  • Hi friends, How to send any data (even binary) through XI, without using

    1) How to send any data (even binary) through XI, without using the Integration Repository .?

    hi ganga,
    Yes; 
    1. we can test adapters very easily and quickly without any IR development.
    2. we can send any formatted data without having to convert it to XML and back again, e.g. file->XI->file.
    3. we can send any document from 1 sender to multiple receivers using XI to guarantee delivery.
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    the process integration layer of the NetWeaver  define/reuse interface objects for the SAP Integration Repository. These objects include Business Scenarios, Business Processes, Message Interfaces, Message Types, Data Types, Message Mappings, and Interface Mappings. The application developer refers to these objects in defining the interactive flow between applications for the SAP Integration Directory.
    regards,
    nikhil

  • Writing binary data to a file without carriage returns every 512 bytes

    Is there a VI for writing binary data to a file without carriage returns being inserted every 512 bytes?
    Thanks

    Hi Momolxg,
    I could be way off on this. I tried to simulate what you've done by
    making a for loop that would run a set number of times. For my example I
    used 1025. I wired the iteration terminal to a 'Write to SGL File.vi'
    outside the loop with indexing enabled. It wrote the SGL data from 0 to
    1024 to the file. I then read the file with a 'Read Characters from
    File.vi' and searched the output for a carriage return (0D hex). It was
    found five times. The reason why was the SGL number it was reading had a
    13 (0D hex) in it. Perhaps you're running into a similar problem?
    I tried it again, this time using the 'Write to I16 File.vi'. The
    carriage return was found five times: the 28th character the first time
    then on the 512th character four consecutive time
    s after that. I suppose
    that makes sense that you'd find a 0D in the numbers at equal spacings if
    they're incrementing this way... In this case the carriage returns you're
    seeing are actually numbers from your data.
    One big difference is that I'm using a set pattern of numbers. This
    doesn't appear to be your case. Is there a better way we can duplicate
    your problem? It sounds interesting. Again my simulation could be way
    off. (I'm also running this on LV60 for Linux so my results could be
    different)
    - Kevin
    In article <[email protected]>,
    "momolxg" wrote:
    > Is there a VI for writing binary data to a file without carriage returns
    > being inserted every 512 bytes? Thanks

  • Do anyone know how to convert a decimal to binary, 1 into 01

    do anyone know how to convert a decimal to binary
    i wants to convert 1 into 01, but the computer print out 1, it didn't print 0
    also 0 it also print only 0, and 3 it print11
    so decimal of 3, the computer print correct, but 0 and 1 it print wrong
    how can i print 01 if my decimal is 1
    int a=1;
    System.out.print(Integer.toBinaryString(a));
    can anyone help me solve this question
    and
    you can use java or jsp
    if you can use jsp it would be better, if not use java

    it's not printing anything 'wrong'.
    0 in binary is 0
    1 in binary is 1
    All it's doing is cutting off leading zeros since they don't change the value.
    1 is the same as 01 is the same as 00000001...no difference
    Similarly, when you print decimal 3 as 11, it could just as easily say 00000011 and be correct, since the zeros don't change anything.

  • How to convert TIF image to Binary internal table.

    How to convert TIF image to Binary internal table

    Hi,
    this forum is for the SAP Integration Kit.
    I would first of all suggest you describe your problem in more details as you are not even describing which products you are using and second I would suggest you post it into the correct forum.
    regards
    Ingo Hilgefort

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • How do you import data base dmp file in oracle 10g

    How do you run data base dmp file in oracle 10g

    Examples..
    Table Exports/Imports
    The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax:
    expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
    impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log
    For example output files see expdpEMP_DEPT.log and impdpEMP_DEPT.log.
    The TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.
    Schema Exports/Imports
    The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported. The following is an example of the schema export and import syntax:
    expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
    impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log
    For example output files see expdpSCOTT.log and impdpSCOTT.log.
    Database Exports/Imports
    The FULL parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax:
    expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
    impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log

  • I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    I know that how to convert any documents to pdf file, but don't know how to get barcode on it. I am using windows 8.1. and want to see barcode on my documents before the print. Please help.

    Hi Frank ,
    Please refer to the following link and see if this helps.
    https://helpx.adobe.com/acrobat/kb/error-organizer-database-damaged-reset-1.html
    Regards
    Sukrit Dhingra

Maybe you are looking for

  • I can't reset my password

    I can't reset my password or the questions...Every time I answer the. Question it's wrong.. When I have it sent to my email I never get the email from apple..

  • Exchange rate in ob08

    hello all, In ob08 exchange rate is defined.ob08 excgange is updated on daily basis. 1)now i want to make po that will pich exchange rate from ob08 on date 1.1.2012 2)i want to make GR that picks exchange rate from ob08             30.1.2012 3)i want

  • Wii U – What games are you playing?!

    Hey all, I recently purchased a Wii U and I'm pretty disappointed in myself for not having made this purchase earlier! I'm primarily a PC gamer, although the older Nintendo consoles, such as the SNES, were the reason I got into gaming in the first pl

  • "Save As" Not Working

    Hi, I've never had trouble saving movies on Quicktime Pro before, but for some reason, after editing a video and clicking "Save As" today it failed to do anything (no compressing file window opened up, no name change of file happened, and no new file

  • Save editable PDF so clients can't edit it

    I created a PDF with forms for my colleagues to fill out. They have Adobe Reader 9. How can they save the PDF so it becomes UNeditable so they can send it to their clients?