How to download an image from java server

Hi,
   I have created a program which allows me to upload images to Java Server thru Multipart.
How can i receive an image from server and download it to iPhone app.Is there any way apart from NSURL i can download the image.
Base64 Encoding & Decoding  seems to be not working.
Thanks in advance,
  Haritha

Hi,
   I have created a program which allows me to upload images to Java Server thru Multipart.
How can i receive an image from server and download it to iPhone app.Is there any way apart from NSURL i can download the image.
Base64 Encoding & Decoding  seems to be not working.
Thanks in advance,
  Haritha

Similar Messages

  • How to download RAW images from Canon S100 to iPhoto?

    How to download RAW images from Canon S100 to iPhoto?

    You need the Raw compatibility update 3.9:
    http://support.apple.com/kb/DL1473

  • How to download ALL MAIL from the server in a Mail app ?

    How to download ALL MAIL from the server in a Mail app ? I want all the mail messages, sent, received ON my computer... Thanks much !!!!!!!

    In Mail's Accounts/Mailbox Behavior preference pane make sure these 4 checkboxes are NOT checked:
    OT

  • How to read bytes(image) from a server ?how to display image after read byt

    How to read bytes(image) from a server ?how to display image after reading bytes?
    i have tried coding tis , but i couldnt get the image to be display:
    BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
    int length1;
    byte [] data=new byte[1048576];
    if((length1=in1.read(data))!=-1){
    System.out.println("???");
    }System.out.println("length "+length1);
    Integer inter=new Integer(length1);
    byte d=inter.byteValue();

    didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?

  • How to Download a file from web server using servlets

    how do we download a file from Java Web Server connecting to oracle database
    it should start as soon a i click a button in my html browser
    please reply as it is needed to complete my project to submited to the collage

    With SQLJ you can do it.
    When you look at:
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/basic/basic.htm
    or
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.htm
    There are samples for reading LONGRAW / BLOB from Database. If you want use it in servlet you have to pass the result to the responce object, set the correct mime-type and set the response.setContentLength( xx). This is for some PlugIns nessessary (pdf).
    regards Dietmar

  • How to download an image from SAP to my PC?

    Hello SAPients.
    I know that I can upload an image to SAP using transaction SE78, but now I need the inverse process, I mean, download an image from SAP to my PC. How can I do this?
    Thanks in advance for your help.

    The following program codes allow you to download SAP images stored in SE78 and the traditional SO10:
    *& Report  Z_DOWNLOAD_BDS_GRAPHICS
    *& Download image stored in document server
    *& Published at ****************
    REPORT  z_download_bds_graphics                 .
    * Variable declaration
    DATA: v_graphic_size TYPE i,
          v_graphic_xstr TYPE xstring,
          v_graphic_conv TYPE i,
          v_graphic_offs TYPE i,
          v_file         TYPE string.
    * Table declaration
    DATA: BEGIN OF i_graphic_table OCCURS 0,
            line(255) TYPE x,
          END OF i_graphic_table.
    DATA: lt_tline type table of tline with header line.
    data: l_thead type thead.
    * Structure declaration
    DATA: st_stxbitmaps       TYPE stxbitmaps.
    * Selection screen
    PARAMETERS: P_SO10 RADIOBUTTON GROUP RB1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: p_TDID     LIKE THEAD-TDID DEFAULT 'ADRS',
                p_TDNAME   LIKE THEAD-TDNAME,
                p_TDOBJ    LIKE THEAD-TDOBJECT DEFAULT 'TEXT',
                p_TDSPRA   LIKE THEAD-TDSPRAS DEFAULT 'EN'.
    SELECTION-SCREEN END OF BLOCK b2.
    PARAMETERS: p_se78 RADIOBUTTON GROUP RB1.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_object LIKE st_stxbitmaps-tdobject DEFAULT 'GRAPHICS'
                                  MODIF ID abc ,
                p_name   LIKE st_stxbitmaps-tdname,
                p_id     LIKE st_stxbitmaps-tdid DEFAULT 'BMAP'
                                  MODIF ID abc ,
                p_type   LIKE st_stxbitmaps-tdbtype.
    SELECTION-SCREEN END OF BLOCK b1.
    PARAMETERS: p_dir    TYPE localfile DEFAULT 'D:\GIS'.
    * At Selection-screen output event
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC' .
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    * At Selection-screen on value-request event
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dir.
      DATA: l_folder TYPE string.
      CALL METHOD cl_gui_frontend_services=>directory_browse
        EXPORTING
          window_title         = 'Select Folder'
          initial_folder       = 'C:\'
        CHANGING
          selected_folder      = l_folder
        EXCEPTIONS
          cntl_error           = 1
          error_no_gui         = 2
          not_supported_by_gui = 3
          OTHERS               = 4.
      IF sy-subrc = 0.
        p_dir = l_folder.
      ENDIF.
    * Start-of-selection event
    START-OF-SELECTION.
      IF p_se78 = 'X'.
        st_stxbitmaps-tdobject = p_object.
        st_stxbitmaps-tdname = p_name.
        st_stxbitmaps-tdid = p_id.
        st_stxbitmaps-tdbtype = p_type.
    *   Get the bmp image from BDS in hex string format
        CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
          EXPORTING
            p_object       = st_stxbitmaps-tdobject
            p_name         = st_stxbitmaps-tdname
            p_id           = st_stxbitmaps-tdid
            p_btype        = st_stxbitmaps-tdbtype
          RECEIVING
            p_bmp          = v_graphic_xstr
          EXCEPTIONS
            not_found      = 1
            internal_error = 2
            OTHERS         = 3.
        IF sy-subrc = 0.
    *     Find the length of hex string
          v_graphic_size = xstrlen( v_graphic_xstr ).
          CHECK v_graphic_size > 0.
          v_graphic_conv = v_graphic_size.
          v_graphic_offs = 0.
    *     Populate internal table from this hex string
          WHILE v_graphic_conv > 255.
            i_graphic_table-line = v_graphic_xstr+v_graphic_offs(255).
            APPEND i_graphic_table.
            v_graphic_offs = v_graphic_offs + 255.
            v_graphic_conv = v_graphic_conv - 255.
          ENDWHILE.
         i_graphic_table-line = v_graphic_xstr+v_graphic_offs(v_graphic_conv).
          APPEND i_graphic_table.
    *     Prepare file name and file path
          CONCATENATE p_dir '\' p_name '.BMP' INTO v_file.
    *     Download image
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize            = v_graphic_size
              filename                = v_file
              filetype                = 'BIN'
            TABLES
              data_tab                = i_graphic_table
            EXCEPTIONS
              file_write_error        = 1
              no_batch                = 2
              gui_refuse_filetransfer = 3
              invalid_type            = 4
              no_authority            = 5
              unknown_error           = 6
              header_not_allowed      = 7
              separator_not_allowed   = 8
              filesize_not_allowed    = 9
              header_too_long         = 10
              dp_error_create         = 11
              dp_error_send           = 12
              dp_error_write          = 13
              unknown_dp_error        = 14
              access_denied           = 15
              dp_out_of_memory        = 16
              disk_full               = 17
              dp_timeout              = 18
              file_not_found          = 19
              dataprovider_exception  = 20
              control_flush_error     = 21
              OTHERS                  = 22.
          IF sy-subrc = 0.
            WRITE: 'File downloaded successfully'(003), v_file.
          ELSE.
            WRITE: 'Error during file download'(004).
          ENDIF.
        ELSE.
          CASE sy-subrc.
            WHEN 1.
              WRITE: 'Image not found'(005).
            WHEN OTHERS.
              WRITE: 'Error in Image retrieval'(006).
          ENDCASE.
        ENDIF.
      ENDIF. "IF P_SE78 = 'X'.
      IF P_SO10 = 'X'.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
    *       CLIENT                        = SY-MANDT
            ID                            = p_TDID
            LANGUAGE                      = p_TDSPRA
            NAME                          = p_TDNAME
            OBJECT                        = p_TDOBJ
    *       ARCHIVE_HANDLE                = 0
    *       LOCAL_CAT                     = ' '
          IMPORTING
            HEADER                        = l_thead
          TABLES
            LINES                         = lt_tline
          EXCEPTIONS
             ID                            = 1
             LANGUAGE                      = 2
             NAME                          = 3
             NOT_FOUND                     = 4
             OBJECT                        = 5
             REFERENCE_CHECK               = 6
             WRONG_ACCESS_TO_ARCHIVE       = 7
             OTHERS                        = 8
        IF SY-SUBRC <> 0.
              WRITE: 'Image not found'(005).
        ENDIF.
    CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP'
      EXPORTING
        ITF_HEADER                     = l_thead
        OLD_FORMAT                     = 'ITF'
        NEW_FORMAT                     = 'BMP'
        BITMAP_FILE_BYTECOUNT_IN       = 0
        ITF_BITMAP_TYPE_IN             = '*'
    IMPORTING
       BITMAP_FILE_BYTECOUNT          = v_graphic_size
    *   ITF_BITMAP_TYPE_OUT            =
      TABLES
        ITF_LINES                      = lt_tline
        BITMAP_FILE                    = i_graphic_table
    *   BDS_BITMAP_FILE                =
      EXCEPTIONS
        NO_BITMAP_FILE                 = 1
        FORMAT_NOT_SUPPORTED           = 2
        BITMAP_FILE_NOT_TYPE_X         = 3
        NO_BMP_FILE                    = 4
        BMPERR_INVALID_FORMAT          = 5
        BMPERR_NO_COLORTABLE           = 6
        BMPERR_UNSUP_COMPRESSION       = 7
        BMPERR_CORRUPT_RLE_DATA        = 8
        BMPERR_EOF                     = 9
        BDSERR_INVALID_FORMAT          = 10
        BDSERR_EOF                     = 11
        OTHERS                         = 12
    IF SY-SUBRC <> 0.
              WRITE: 'Error in Image Format'(006).
    ENDIF.
        if sy-subrc = 0.
          CONCATENATE p_dir '\' p_TDNAME '.BMP' INTO v_file.
    *     Download image
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize            = v_graphic_size
              filename                = v_file
              filetype                = 'BIN'
            TABLES
              data_tab                = i_graphic_table
            EXCEPTIONS
              file_write_error        = 1
              no_batch                = 2
              gui_refuse_filetransfer = 3
              invalid_type            = 4
              no_authority            = 5
              unknown_error           = 6
              header_not_allowed      = 7
              separator_not_allowed   = 8
              filesize_not_allowed    = 9
              header_too_long         = 10
              dp_error_create         = 11
              dp_error_send           = 12
              dp_error_write          = 13
              unknown_dp_error        = 14
              access_denied           = 15
              dp_out_of_memory        = 16
              disk_full               = 17
              dp_timeout              = 18
              file_not_found          = 19
              dataprovider_exception  = 20
              control_flush_error     = 21
              OTHERS                  = 22.
          IF sy-subrc = 0.
            WRITE: 'File downloaded successfully'(003), v_file.
          ELSE.
            WRITE: 'Error during file download'(004).
          ENDIF.
        endif.
      ENDIF.

  • How to download a file from application server to presentation server

    Hi experts,
    I want to download a file from application server to presentaion server, file contaims three fields customer name, customer email id and status..
    help me out i m new into sap.

    Dear Aditya,
    Please check below thread
    http://scn.sap.com/thread/1010164
    it will help you.
    BR
    Atul

  • How to download a file from a server

    Hi,
    I have a question with a general design implementation. Hope anyone more skilled than me helps me.
    I want to do an application based on an android client and a java server. Local wifi transmission, no 3G.
    Basically, the client must connect to the server and request a file to download using a code.
    How can I do that?
    Things I know:
    * I must create a background thread in the client to create a file in the SD card and update a progress bar using a Handler to communicate with the UI thread.
    * The server must be multithread and non-blocking.
    * The file is a binary file like a mp3 audio. So the server has to:
    1. Send information about the file: name and total length.
    2. Open the file, read and send bytes while it does not reach the end.
    * The client has to:
    1. Receive the information about the file and create an empty file.
    2. Read bytes and dump them into the empty file. Update progress bar.
    3. When all bytes are recieved close the file.
    I have knowledge implementing a client and server in C (very awful) but I am beginning with a real client-server application done in java.
    Questions:
    * How can I download a binary file like an mp3 from a server to a client?
    * Where I have to put my server application? I supose that I must create a jar, save it on a folder and execute it at PC start-up, right?
    Thanks!
    PD: I know this is not an android forum but I only need help with the download process.
    Edited by: user13425637 on 06-dic-2010 11:08

    Questions:
    * How can I download a binary file like an mp3 from a server to a client?There are a ton of examples on the internet on how to download files. If you are having a problem, please post your code.
    >
    * Where I have to put my server application? I supose that I must create a jar, save it on a folder and execute it at PC start-up, right?Your server application will exist on a server and will run the application. hence the reason for the server. The best best for you is to read some online tutorials on client/server and how it works.

  • How to download a mail from pop3 server to an HTML Form

    Hi Friends,
    i want to download the Mails from a POP3 server using an Html
    Interface.I mean not from command Line.
    I have designed an interface that will send emails to Recipients,
    but i didn't get any idea about how to download the mails to an interface like a HTML Form.
    if any body know the answer post the replay with the code snipnet
    Nagaraju G.

    In Mail's Accounts/Mailbox Behavior preference pane make sure these 4 checkboxes are NOT checked:
    OT

  • How to download a file from Middleware server

    Hi,
    I have a requirement to list file names in a table layout and when user clicks on file name, file must be downloaded to the client tier. Source files are located in 11i Apps middletier.
    I did not find any examples on how to achieve this using OAF. All I see is downloading file from BLOB inside a database.
    please help..

    OAMessageDownloadBean is the bean that lets you download a file from middletier.
    Please see the File Upload and Download chapter in devguide for implementation details.
    Thanks
    Tapash

  • How to download a file from a server path?

    Is it possible to attach files on the server to a web dynpro response with cl_wd_runtime_services=>attach_file_to_response? All the examples I have seen assume you have the file content as an XSTRING. But how can one just send a file from a known path?
    Is it really necessary to first load the file (e.g. a 50Mb TIFF) as an XSTRING before downloading it? If so, how is this done?

    Hi Marc,
    Try using this FM to convert String to Xstring.
    SCMS_STRING_TO_XSTRING
    HR_KR_STRING_TO_XSTRING
    and also check this...Error document.getElementById(...)  in function 'SCMS_STRING_TO_XSTRING'
    Might Helps you.
    Cheers,
    Kris.

  • J2ee Webservices(How i can send Image from java to C sharp)

    Dear Everyone
    Hi
    I am currently working on J2EE base web services project.
    I want to transfer some binary data as Images or files to client as (client written in c sharp).
    How i can do this exactly because i have no idea
    I am usnig sun App Server or JWSDP for this purpose
    Is there any one who has some experience with such knowledge.
    Kindly give me ur suggestions regarding this.
    Kind Regard
    kashif

    Thanks for the quick reply...i tried that and it works ...but not sure how to release that memory got from " New " and sure....there results memoryleak.this method will be called about 50 lakh plus times...so application suffers due to this memory leak....is any way i can avoid using New with in my Dll.....?

  • How to download a file from application server in webdynpro

    Hi Experts,
                       I am trying to download a file through Web Dynpro file download UI element..The file is stored in application server in binary format ..in my code i am reading the file in binary mode,converting Binary File into Xstring(Using FM SCMS_BINARY_TO_XSTRING) ..getting its Mime type and binding the UI element properties (data with XString, Mime type and file name) with respective context attributes..But the problem is file is getting opened but Junk data is getting displayed on it..Not sure where i am making the mistake.

    Hi Lukas,thanks for the reply..please find the code
    here '/tmp/accenturedocs'  is the folder name on application server,and zdocs_list_tab is the table that contains file URL.File upload is on the BSP page (custom logic to upload the file ) where they are storing local file path in ztable.Same i am extracting in my code to get File URL.
    DATA: i_file TYPE rlgrap-filename .
      DATA:v_path TYPE zlist.
      DATA:i_datatab TYPE STANDARD TABLE OF tbl1024,
           wa_datatab TYPE   tbl1024.
      DATA  file TYPE  string.
      DATA dot_offset TYPE i.
      DATA extension TYPE mimetypes-extension.
      DATA mimetype TYPE mimetypes-type.
      SELECT SINGLE description
        FROM  zdocs_list_tab
        INTO v_path.
      CONCATENATE '/tmp/accenturedocs' v_path INTO i_file.
      FIELD-SYMBOLS <hex_container> TYPE x.
      OPEN DATASET i_file FOR INPUT IN LEGACY BINARY MODE.
      IF sy-subrc NE 0.
        MESSAGE e999(00) WITH 'Error opening file' .
      ENDIF.
      ASSIGN  wa_datatab TO <hex_container> CASTING.
      DO.
        READ DATASET i_file INTO <hex_container>.
        IF sy-subrc = 0.
          APPEND wa_datatab TO i_datatab.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET i_file.
      DATA:l_count TYPE i,
            l_len TYPE i.
      DESCRIBE TABLE i_datatab LINES l_count.
      READ TABLE i_datatab INTO wa_datatab INDEX l_count.
      l_len = XSTRLEN( wa_datatab-line ).
      l_len = l_len + ( l_count - 1 ) * 1022.
    DATA: v_xstring TYPE xstring.
      CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
        EXPORTING
          input_length = l_len
        IMPORTING
          buffer       = v_xstring
        TABLES
          binary_tab   = i_datatab
        EXCEPTIONS
          failed       = 1
          OTHERS       = 2.
      IF sy-subrc <> 0.
      ENDIF.
    file = i_file.
      " Find out file name extension
      FIND FIRST OCCURRENCE OF REGEX '\.[^\.]+$' IN file MATCH OFFSET
      dot_offset.
      ADD 1 TO dot_offset.
      extension = file+dot_offset.
      " Get mime type
      CALL FUNCTION 'SDOK_MIMETYPE_GET'
        EXPORTING
          extension = extension
        IMPORTING
          mimetype  = mimetype.
    DATA lv_file_content TYPE wd_this->element_context-file_content.
    get element via lead selection
      lo_el_context = wd_context->get_element( ).
    set single attribute
      lo_el_context->set_attribute(
        name =  `FILE_CONTENT`
        value =  v_xstring ).
    same way i am assigning file name and file mime type to context attributes.
    please suggest where is the mistake.

  • How to download a file from other server using servlet

    Hi All....
    Good Morning....
    right now,i am facing a problem..i am trying to download a file which is in other server..i tried somany ways and i couldnt succeed in this...
    will u pls give me solution for this..
    because it is very urgent for me...
    i am very much thankful if u provide me the code samples also....
    i am seeking ur help...
    Regards,
    sathya

    right now,i am facing a problem..i am trying to download a file which is in other server..i tried somany ways and i couldnt succeed in this...If you can tell some of our approaches and the failures you faced, someone might be able to help you.
    I dont think anyone will just give the code samples.

  • To load the image from appl. server to FORM

    Hi all,
    i have to fetch the image from Application server and Print in a form. i don't know how to load the image from appl. server to FORM.Through SE78 i guess we can load the image only from presentation server,,,,can anyone help on this????

    Hi Bhuvaneshwari ,
    Through <b>SE78</b> you can fetch the image from application server.
    Goto><b>Graphics</b>><b>BMAP(Bit map images)</b>>In <b>Name</b> parameter click <b>F4</b> for input help.>click on <b>execute</b> button.
    These images are stored on document server.
    There you can find images of application server.
    Those images you can import.
    Reward if helpful.
    Regards,
    Sandhya.

Maybe you are looking for

  • Is it possible to assign a DEFAULT VALUE to [%1]?

    Dear All, Let's suppose I write a code like this: SELECT T0.Ref1 AS 'Doc Num' FROM JDT1 T0 WHERE T0.RefDate = [%1] When I run this query, it gives the foll. dialog box asking me to enter the Posting Date. Query Selection Criteria Posting Date       E

  • Notes not syncing with Outlook & not automatically backing up

    When I upgraded to the latest version of iTunes the syncing behavior changed with my 4G.  I sync music, photo's, everything but the "Info" category with my home PC's iTunes.  Then at work I let Contacts, Calendars, Mail & Reminders sync via Exchange.

  • IMac 24 weirdness

    My iMac 24 suddenly stopped working this morning. Now it won't boot up at all. I opened it up and noticed that the Number 1 light was on but none of the others were on at all. I believe the number 1 light is the trickle from the power supply right? A

  • Can't send iMessages after updating to ios 7! Help ! I can't communicate with people

    After updating to ios7 I can't send imessages !! Now I know why people don't reply to my messages, they never get them !!! Plz help

  • Creating item category in WebTools CRM 2007

    I am new to Webtools CRM 2007.  I need some help in creating catgeories so my users can create quotes and orders.  However, I am receiving an error message stating I need a part category first.  When I lok at my Bulk operations in the category sectio