How to convert binary file to a particular format?

Hi,
I am having a requirement. I have in database various kinds of files stored as binary format. Its a sybase database. Now the files can be .pdf, or .doc also. But they are stored in binary format.
I need to read the file from database.
Now I can use jdbc to read the particular column value which contains the file in binary format.
But tricky part is how to convert the binary file entry in a proper respective file format? So I have another column which basically has the value to tell the type of file. So I have ".doc" or ".pdf" as each entry of file...
So please help me how can we do this using Java?
THanks

Hi,
I am having a requirement. I have in database various
kinds of files stored as binary format. Its a sybase
database. Now the files can be .pdf, or .doc also.
But they are stored in binary format.
I need to read the file from database.
Now I can use jdbc to read the particular column
value which contains the file in binary format.
But tricky part is how to convert the binary file
entry in a proper respective file format? So I have
another column which basically has the value to tell
the type of file. So I have ".doc" or ".pdf" as each
entry of file...
So please help me how can we do this using Java?
THanks

Similar Messages

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • How to Convert binary file to s-records

    Hi all,
    can anybody help how to convert binary ".bin" files to s-record ".s" files
    any idea or code snippets are very appreciated
    best regards,
    gebi

    There is a ready-made converter: "BINARY to Motorola S-Record Conveter Utility" or BIN2MOT.
    http://www.keil.com/download/docs/bin2mot.zip.asp
    Other references:
    http://www.cs.net/lucid/moto.htm
    http://www.amelek.gda.pl/avr/uisp/srecord.htm
    http://www.seattlerobotics.org/encoder/jun99/dougl.html
    http://semmix.pl/mipc/specyf/filehex/mhexu.htm
    http://pmon.groupbsd.org/Info/srec.htm

  • How to Save Pdf file in a particular format

    Hi Experts,
                        Can anybody tell me how to save a pdf file in a particular format,My requirement is i have a print button in webdynpro ,when ever user clicks on print ,adobe form is opened ,if user clicks on save .Form is saving with adobe form name .My requirement is it should be saved as ID NO.Date.Pdf  form lets Id is 0456 ,form should be saved as 0456.040614.pdf format, Thanks in Advance
    Regards
    Sandesh

    Hi Sandesh,
    Please provide the complete code from print & save button.
    Thanks & Regards,
    Balamurugan G

  • How To Convert DVD Files To Nokia N8 Format?

    Which Converter Is To Be Used So That We Can Watch Movies In N8

    You can get Any Video Converter from download.cnet site... It's a reliable site.. Enter all this on google and you should find the direct page for this software.
    Then remember, any good video will be playable with the following details:
    1. size under 1080x720 pixels.
    2. Format MP4, AVI, FLV, 3GP, etc. I recommend only MP4 and AVI. ok?
    3. Size under 2 GB per file,
    ==============================
    My Story: Used 6670, Used N91, Used N8, Using Pureview 808 now. I requested Nokia to get N91's sound quality and features in the latest phones. No response from Nokia!

  • 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/

  • How to parse binary files

    Hi All,
    I have one binary file (abc.dat) file I want to parse that file and need it in text format.
    Can anyone tell me how can I achieve that? is there any third party tools available?
    lines are like below:
    00000000h: 76 04 00 01 00 FF 0F 11 FF 09 07 03 15 ; v....
    can anyone have idea how can i resolve this?
    Thanks!!!

    Hi
    thanks for reply...
    actually what I want is a line that I have posted in first conversation the whole file has lines like that. Now, I want to convert that file in to text format.
    right now I am reading lines with the below code...
    try{
                   FileInputStream fstream = new FileInputStream("test.dat");
                   DataInputStream in = new DataInputStream(fstream);
                   BufferedReader br = new BufferedReader(new InputStreamReader(in));
                   //BufferedInputStream bufferedInputStream = new BufferedInputStream(in);
                   String strLine;
    //               Read File Line By Line
                   while ((strLine = br.readLine()) != null) {
    //                Print the content on the console
                   System.out.println (strLine);
    //               Close the input stream
                   in.close();
                   }catch (Exception e){//Catch exception if any
                   System.err.println("Error: " + e.getMessage());
                   }and I don't get output in the text format.
    So, after doing this can anyone please tell me how can I get decoded format file?
    what are the next steps I should go?
    For, example we can go for (index.dat) file.
    Thanks!!!

  • How to convert .class file to exec file...

    hi.
    how to convert .class file to exec file...
    please explain me clearly.....
    thanks...

    Placing your exact "question" into google:
    http://www.google.com/search?q=how+to+convert+.class+file+to+exec+file...

  • HOW TO CONVERT PDF FILE IN TO XML FILE?

    HOW TO CONVERT PDF FILE IN TO XML FILE

    No Office programs can open a pdf and edit the contents so you will have to get a different app to convert teh pdf into xls format. There are plenty to be found on the web.
    Rod Gill
    The one and only Project VBA Book
    Rod Gill Project Management

  • How to convert XML file to an internal table ?

    Hi All,
    I want to do a batch input program. The source data would be given as an excel file . I would like to know how to convert XML file to internal table properly. Please help me out..
    Thanking you in advance ..
    Shankara Narayanan T.V

    Hi Shankar,
    use 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file1
                  i_begin_col             = '1'
                  i_begin_row             = '5'
                  i_end_col               = '40'
                  i_end_row               = '16'
             TABLES
                  intern                  = it_intern
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    LOOP AT it_intern.
          AT NEW row.
            CLEAR it_intern.
          ENDAT.
            CASE lv_flag.
        Production Version
              WHEN  1.
                it_master-matnr      =   it_intern-value.     
              WHEN  2.
                it_master-werks      = it_intern-value.
              WHEN  3.
                it_master-verid      = it_intern-value.
              WHEN  4.
                it_master-text1      = it_intern-value.
              WHEN  5.
                it_master-fdate     = it_intern-value.
          AT END OF row.
            APPEND it_master.
          ENDAT.
        ENDLOOP.
    -Anu
    Message was edited by:
            Anupama Reddy

  • How to convert jpeg files into word

    How to convert jpeg files into Word

    Hi Eugene,
    I don't think you can convert an image to a Word document, but you could place the JPEG into a Word document using the Insert > Object command in Word.
    For other questions relating to Word, you will probably have more luck getting an answer if you post on the Microsoft forums (we can help if you're using Acrobat, or another Adobe product, but you'll find the Word experts on the Microsoft forums.)
    Best,
    Sara

  • How to convert RAW files that saved in UCCX server to wav file?

    Hi all,
    How we can covert the RAW files that are saved in UCCX server to wav file by using command prompt in UCCX servers. Or is there some other way? So that we should be able to hear the sound of these files.
    C:\Program Files\Cisco\Desktop_Audio
    Regards
    Ali Raza

    Hi,
    I use Switch File Audio Convertor from NCH Software to do this.
    It is a commercial product but there is a time limited evaluation and if you decide to keep it it is only $30.
    http://www.nch.com.au/switch/index.html
    It is great for converting audio files to the correct format for music on hold as well.

  • How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?

    Hello,
    How to convert XPS file to a PDF one via Adobe Acrobat XI Pro with command line?

    It is not good. If I need to export some hundred of separate *.XPS files to hundred separate *.PDF files, I need to do this manually with each file. It is stone age.

  • How to converting WMV files?

    How to converting WMV files from PC to iPod playable files? thanks for all your help

    I just found this tip on allexperts.com...
    I'm on a windows box at work, so I cant verify the accuracy.
    I have one at home...name escapes me right now...icon is a blue square with 5 black dots (like on a die). It converts audio formats, video formats, extracts audio from video, and will batch process.
    Maybe someone will recognize the desciption and be able to name it.
    =======
    heres one on apples site:
    http://www.apple.com/downloads/macosx/audio/switchfileformatconverterformac.html
    =======
    Tunes will convert wma to mp3 (or acc) format. Here are the instructions:
    To convert a song's file format:
    Choose iTunes > Preferences, then click the Advanced button at the top of the window and click Importing.
    From the Import Using pop-up menu, choose the encoding format that you want to convert the song to, then click OK to save the settings.
    Select one or more songs in your library, then choose Advanced > Convert Selection to MP3, Convert Selection to AAC, Convert Selection to Apple Lossless, Convert Selection to AIFF, or Convert Selection to WAV. (The menu item changes to show what's selected in your Importing preferences.)
    To convert all the songs in a folder or on a disk, hold down the Option key and choose Advanced > "Convert Selection to," then choose the folder or disk containing the songs you want to convert. All the songs in the folder or on the disk will be converted except songs you purchased from the iTunes Store. (Purchased songs are encoded using a protected AAC format that prevents them from being converted.)

  • How to upload binary file in database?

    Using servlets..how to upload binary file into database...
    How to get the data of file in servlet...
    Please reply...i'm unable to find exact code...that i want..

    You need to do two separate parts: accept the file from a HTTP multi-part POST and then stream it into a BLOB on the database. To do the former, download Jakarta Commons FileUpload. There is extensive documentation on how to write a simple handler for the upload. You then need to send the data to a BLOB. The specifics vary from database to database but generally you will insert or update a row with an empty blob, get a reference to the blob, pipe the data and then commit.
    If you do a quick forum search, this question has been asked (and answered) dozens of times. Some of the replies may even have code for you. Best of luck.
    - Saish

Maybe you are looking for