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?

Similar Messages

  • Read Money format from SQL Server 2008

    Hi all,
    i created a db link from oracle to sql server using Heterogeneous Connectivity, it works fine, i can read/write data from SQL Server 2008 but i can't read column with money format correctly, i got always a integer number.
    Can anyone help me, please?
    Sergio

    Hi Mark,
    with the command
    describe TEST@DL_SQLSERVER2008
    i get the error :
    Error: ORA-00904: "OBJECT_TYPE": invalid identifier
    If i create a table :
    CREATE TABLE TEMP AS (SELECT * FROM TEST@DL_SQLSERVER2008 );
    the column of the table TEST with type MONEY is mapped to the type number(19,4)
    With the query from SQL Server the output is :
    Entita Serie     Articolo     Prezzo
    1     AB      0207405      3,822
    1     AB      0503019      3,60
    1     AB      0509015      15,75
    1     AB      0706015      1,96
    1     AB      0810050      1,617
    1     AB      STANDARD 0,00
    With the query from Oracle the output is :
    Entita Serie     Articolo     Prezzo
    1     AB      0207405      3
    1     AB      0503019      3
    1     AB      0509015      15
    1     AB      0706015      1
    1     AB      0810050      1
    1     AB      STANDARD 0
    Thanks,
    Sergio

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

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

  • Using flash to display images from sql server or file system

    hello,
    what methods and parameters of the urlloader class we have to use to display images in a flash player if possible..
    also movie should update everytime a new image is added to a database or file
    the images can either be in a file system or in a sql database (if possible)
    does flash comes with an object of this type or we have to create it.
    regards,

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • What are the commands available to read a file from application server and

    What are the commands available to read a file from application server and store the file into an internal table?

    Hi,
    To read a file from an Application Server to an Object there is a command in ABAP called <b>READ DATASET</b>. After that file is transported to that object you have to do a loop and put that data in an Internal Table.
    This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file.
    For dset, a character-type data object is expected - that is, an object that contains the platform-specific name of the file. The content is read from the file starting from the current file pointer. After the data transfer, the file pointer is positioned after the section that was read. Using the MAXIMUM LENGTH addition, the number of characters or bytes to be read from the file can be limited. Using ACTUAL LENGTH, the number of characters or bytes actually used can be determined.
    In a Unicode program, the file must be opened with an arbitrary access type; otherwise, an exception that cannot be handled will be triggered.
    If the file has not yet been opened in anon-Unicode program, it will be implicitly opened as a binary file for read access using the statement
    OPEN DATASET dset FOR INPUT IN BINARY MODE.
    . If a non-existing file is accessed, an exception that can be handled can be triggered.
    Influence of Access Type
    Files can be read independently of the access type. Whether data can be read or not depends solely on the position of the file pointer. If the latter is at the end of the file or after the file, no data can be read and sy-subrc will be set to 4.
    Influence of the Storage Type
    The import function will take place irrespective of the storage type in which the file was opened with the statement OPEN DATASET.
    If the file was opened as a text file or as a legacy text file, the data is normally read from the current position of the file pointer to the next end-of-line marking, and the file pointer is positioned after the end-of-line marking. If the data object dobj is too short for the number of read characters, the superfluous characters and bytes are cut off. If it is longer, it will be filled with blanks to the right.
    If the file was opened as a binary file or as a legacy-binary file, as much data is read that fits into the data object dobj. If the data object dobj is longer than the number of exported characters, it is filled with hexadecimal 0 on the right.
    If the specified storage type makes conversion necessary, this is executed before the assignment to the data object dobj. Afterwards, the read data is placed, byte by byte, into the data object.
    System Fields
    sy-subrc Meaning
    0 Data was read without reaching end of file.
    4 Data was read and the end of the file was reached or there was an attempt to read after the end of the file.
    Thanks,
    Samantak.
    <b>Rewards points for useful answers.</b>

  • How to upload XML file from Application server.

    Hi,
    How to upload XML file from Application server.Please tell me as early as possible.
    Regards,
    Sagar.

    Hi,
    parameters : p_file type ibipparms-path obligatory.
    ***DOWNLOAD---->SAP INTO EXCEL
    filename1 = p_file.
    call function 'GUI_DOWNLOAD'
      exporting
      BIN_FILESIZE                    =
        filename                        = filename1
        filetype                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      tables
        data_tab                        = it_stock
      FIELDNAMES                      =
    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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards,
    Deepthi.

  • Not recognizing # while reading the file from application server

    Hi
    I am reading a file from application server. While reading into internal table with read statement the last field in each record is filling with hash symbol in the last digit. If I write any if condition with HASH symbol its not going inside the if condition, means its not recognizing as hash may be its internally treating as some other. I need to remove the hash from that field. How I can do that.
    Thanks,
    kishore

    I faced exact situation. Yes, internally its treated as some other special character. What i did was, becuase hash symbol was always coming at the end...i created a dummy field in my internal table so that it will not interfere with my actual data. When i see the data in my internal table, the hash always falls in the last field (dummy) which i will ignore. I could not get solution to remove this hash so i adopted this approach and it worked!!
    Hope it helps,
    SKJ

  • Loader will load images from another server, but then we get error on Bitmap operation

    I'm developing an app that currently is using Loader to get images from another server.  This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place.  However, it does work -- sort of .
    Loader can load the images fine, without an error.  But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
    var myBitmap:Bitmap = Bitmap(loader.content);
    and when this runs we get a Flash player security error 2122, sandbox violation.
    So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
    (Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage?  I don't need to change its actual dimensions -- I just need to change its display width and height.)
    Thanks!

    The sandbox allows viewing, not editing from another server without a crossdomain.
    So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
    This should resolve itself once that crossdomain is in place.
    ||EDIT||
    I just realized I should clarify my statement a little more.
    When you load images from another server without a crossdomain, it allows the load for display only.  When you try to load data, it will fail.  This is because, XML data, or some other type of data is editable by default, and images are only viewable by default.  So, the image fails when you try to convert it into an editable form.

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

  • Regarding Reading the file from Application Server

    Hi,
    I am trying to read data from Application Server but due to special characters it is getting dumped out.
    US24,Q,Acero (Carbon),AA,0010,0001,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),AA,0010,0002,01,Area rectificada sin da#os ra
    US24,Q,Acero (Carbon),AA,0010,0003,01,Ver Mir para dimension#
    US24,Q,Acero (Carbon),CD,0010,0001,01,ITPE Soken para verificacion
    US24,Q,Acero (Carbon),CD,0010,0010,01,No se permite desprendimiento
    US24,Q,Acero (Carbon),CD,0010,0002,01,"Vernier, cinta metrica"#
    In the last line it is going into dump due to special character ".
    Please suggest.
    Thanks
    Priyanka.

    Hi,
    You can check the mode in which you are reading the file
    from application server that is
    Open Dataset in Binary or Text Mode.
    Hope it helps
    Regards
    Mansi

  • FM to read XML files from Application server in ECC5.0

    Hi All,
    We need to pick up an XML file from Application server/FTP server. The requirement is to parse the XML file and process it to create material master. SAP provides standard function modules to read XML files.
    Now we need to read the XML file contents of MM01 and upload into SAP Data Base through BAPI
    I need to know about the Function modules to read XML files from Application Server and also about the FM's that will update the Date base tables with the data obtained form XML files.
    Regards
    Prathima

    Parsing XML data:
    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280ba12d511d5991b00508b6b8b11/frameset.htm
    or alternatively check out ABAP online help for "CALL TRANSFORMATION".
    For creating the material master look at BAPI_STANDARDMATERIAL_CREATE.
    Thomas

  • Hi,how can i transport objects from one server to other like (Dev To Qty)

    Hi Sir/madam,
       Can u explain how can i transport objects from one server to other like (Development To Quality To Production).
    Regards,
    Vishali.

    Hi Vishali,
    Step 1: Collect all Transports(with Packages) in Transports Tab(RSA1)- CTO
    Step 2: Release the subrequests first and then the main request by pressing Truck button
    Step 3: STMS or Customized transactions
    Object Collection In Transports:
    The respective Transports should have the following objects:
    1. Base Objects -
    a. Info Area
    b. Info object catalogs
    c. Info Objects
    2. Info Providers u2013
    a. Info Cubes
    b. Multi Providers
    c. Info Sets
    d. Data Store Objects
    e. Info Cube Aggregates
    3. Transfer Rules u2013
    a. Application Components
    b. Communication Structure
    c. Data Source replica
    d. Info Packages
    e. Transfer Rules
    f. Transformations
    g. Info Source Transaction data
    h. Transfer Structure
    i. Data sources (Active version)
    j. Routines & BW Formulas used in the Transfer routines
    k. Extract Structures
    l. (Note) If the transfer structures and related objects are being transferred without preceding
    Base Objects transport (e.g. while fixing an error) it is safer to transport the related Info
    Objects as well.
    4. Update Rules u2013
    a. Update rules
    b. Routines and formulas used in Update rules
    c. DTPs
    5. Process Chains u2013
    a. Process Chains
    b. Process Chain Starter
    c. Process Variants
    d. Event u2013 Administration Chains
    6. Report Objects u2013
    a. Reports
    b. Report Objects
    c. Web Templates
    Regards,
    Suman

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Reading XML file from application server and  put into internal table-4.6C

    Dear All,
    Is there any way of reading XML file from application server to SAP? I am using 4.6C. Function module SCMS_STRING_TO_XSTRING function module is not available. Please suggest.
    Thanks and regards,
    Atanu

    Hi Atanu!
    Simply use the XSLT transformation 'ID'.
    FIELD-SYMBOLS <ls_result> TYPE ANY.
    CREATE DATA lref_data TYPE (your_structure).
    ASSIGN lref_data->* TO <ls_result>.
    CALL TRANSFORMATION id
                        SOURCE XML xmlstr
                        RESULT result = <ls_result>.
    "xmlstr" contains your XML file. Just read it into it via standard I/O operations. "<ls_result>" will contain your DDIC formatted content.
    Best regards
    Torsten

Maybe you are looking for