Problems in byte conversion.

i have a bytestream. if i convert this to string and then again generated the bytes from string, though the length of bytes are same the values are different.
Detailed Explanation.
i have a bytestream of an image.
and if i write this bytes to a text file using fileoutputstream and manually change the extension from.txt to.tiff i can see the image correctly.
Now if i convert this bytestream to string
and then again back to bytestream and write to a text file and change the extension as before, its giving a different picuture???...
what could be the reason?. is there a better way fo byte conversions than i used
i'll attach my code also.
FileOutputStream fos=new FileOutputStream("C:\\amma.txt");                              
                              System.out.println("Length before: " + bytesStream.length);                                   
                              for(int lm=0;lm<bytesStream.length;lm++)
                                   fos.write(bytesStream[lm]);
                              String s=new String(bytesStream);
                              byte[] b=s.getBytes();                              
                              System.out.println("Length After: " + b.length);                                                            
                              fos.close();
                              FileOutputStream fos2=new FileOutputStream("C:\\amma2.txt");                                                                           
                              for(int lm=0;lm<b.length;lm++)
                                   fos2.write(b[lm]);
                              fos2.close();                              
                         catch(Exception ex1)
                              ex1.printStackTrace();
                         }

I feel rather certain that this question relates
somehow to your
one from earlier today
http://forum.java.sun.com/thread.jspa?threadID=773992
yes u r rite.
i want to upload file...
i'm able to recover half of the image from this
conversion.
but its not that good.
i want to know is there a better way of converting
bytes to string.
'coz i can only assign string values, on webcontrols
like textbox.
and only the value in a webcontrol be retrived from
my .NET server side code.
if i could successfully convert the bytes to string
then the .NET will get the string and do the
reverse.
pls pls pls...any comments???You are doomed. This will never work. Never ever.

Similar Messages

  • Double-Byte Conversion

    Hi Everybody,
    I am Hemant Shukla working as Sr.Oracle Consultant in
    Singapore.I am facing a problem with oracle Double
    -Byte Conversion.My Software is in Oracle-9i and
    D2K-6i.My client requirement is to convert the whole
    software in Chinese language .At the same time he can
    look for english language also ....Then Malayisan then
    Thai...I tried my hand going into registry Editor
    Changing NLS_LANG into chinese with UTF-8.But can't
    get through it.Please give me solution.
    Thanks & Regards
    Hemant Shukla
    Frontier Technologies
    Singapore

    Hemant,
    &gt; But can't get through it.
    What's your problem exactly? Are you getting errors for something else? What's the value of NLS_LANG you tried?
    Regards,
    - Makoto

  • Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view. Also, when I go to enter a new event in google calendar, I now have to click the cursor in the box to type the event (it used to let me just start typing).

    Since downloading Firefox 4, I am having problems archiving gmail conversations from my inbox view (either one or several conversations) as it says "No Conversations Selected" when I have selected one or several. Also, when I go to enter a new event in google calendar, I have to click the cursor in the box to type the event (it used to let me just start typing) or else it flips out and starts jumping to day view or another month. Does anyone know how to fix either of these?

    I have had this problem; but while trying to fix another problem, I reset my preferences for Firefox and it fixed this problem as well. To reset preferences, follow this link: http://support.mozilla.com/en-US/kb/Resetting%20preferences

  • Layout problem in PDF conversion

    Hi all,
    i am downloading spool data using the function module CONVERT_ABAPSPOOLJOB_2_PDF. But i am facing layout problem. e.g. RFBILA00(financial statement generation program) has written balancesheet data to the spool. This spool data has some 6 columns. but CONVERT_ABAPSPOOLJOB_2_PDF is writing only first 3 columns to the generated PDF file. i used 'GET_PRINT_PARAMETERS' function module also with values like layout as 'X_65_132' and 'X_90_120'. but no success. if anybody knows the answer, please let me know.
    Thanks in advance,
    Naveen

    Hi All,
    i am following the below approach to download the information from spool.
    program/spool output is an ALV List output data having 8 columns. but below approach is converting only first 5 columns in to PDF format. other 3 columns are getting truncated.
    FUNCTION /ngl/download_spoolinfo_as_pdf.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_SPOOL_REQUEST) LIKE  TSP01-RQIDENT
    *"     REFERENCE(I_FILENAME) LIKE  RLGRAP-FILENAME
    *"  EXCEPTIONS
    *"      DOWNLOAD_ERROR
      TABLES tsp01.
      DATA: mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE,
            mc_filename LIKE rlgrap-filename.
      DATA: mstr_print_parms LIKE pri_params,
            mc_valid(1) TYPE c,
            mi_bytecount TYPE i.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          copies                 = '1'
          cover_page             = space
          destination            = 'locl'
          expiration             = '1'
          immediately            = space
          mode                   = space
          new_list_id            = 'X'
          no_dialog              = 'X'
          user                   = sy-uname
          line_size              = 200
          line_count             = 65
         layout                 = 'X_65_200'
          layout                 = 'X_90_120'
          sap_cover_page         = 'X'
        IMPORTING
          out_parameters         = mstr_print_parms
          valid                  = mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid              = i_spool_request
            no_dialog                = 'X'
            dst_device               = mstr_print_parms-pdest
          IMPORTING
            pdf_bytecount            = mi_bytecount
          TABLES
            pdf                      = mtab_pdf
          EXCEPTIONS
            err_no_abap_spooljob     = 1
            err_no_spooljob          = 2
            err_no_permission        = 3
            err_conv_not_possible    = 4
            err_bad_destdevice       = 5
            user_cancelled           = 6
            err_spoolerror           = 7
            err_temseerror           = 8
            err_btcjob_open_failed   = 9
            err_btcjob_submit_failed = 10
            err_btcjob_close_failed  = 11
            OTHERS                   = 12.
        IF sy-subrc EQ 0.
          mc_filename = i_filename.
          DATA: lv_filename TYPE string.
          lv_filename = i_filename.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              bin_filesize = mi_bytecount
              filename     = lv_filename
              filetype     = 'BIN'
            TABLES
              data_tab     = mtab_pdf
            EXCEPTIONS
              OTHERS       = 22.
          IF sy-subrc EQ 0.
            WRITE:/ mc_filename, 'CONVERTED TO PDF AND DOWNLOADED'.
          ELSE.
            WRITE:/ 'PROBLEM WITH DOWNLOAD'.
            RAISE download_error.
          ENDIF.
        ELSE.
          WRITE:/ 'PROBLEM WITH PDF CONVERSION'.
          RAISE download_error.
        ENDIF.
      ELSE.
        WRITE:/ 'PROBLEM GETTING PRINT PARAMETERS'.
        RAISE download_error.
      ENDIF.
    ENDFUNCTION.

  • Problems with Quicktime Conversion, FCE2

    I am having problems using quicktime conversion. I want to export a 4 minute sequence into uncompressed AVI.
    Each time i do this i get an almost 4 gb file that is only the first 18 seconds of the sequence. (when i export to WMV I get the same problem, except its 30 seconds)
    I can export using compressed AVIs (such as DV-PAL), but the quality is not too good.
    I am simply trying to get the best quality and most-universally useable file to write out onto a data DVD.
    Any ideas/suggestions anyone?
    I have am using a PowerPC G4 laptop, FCE2, OSX tiger....
    Further problems: when i write this movie out to DVD with iDVD, and when it is in NTSC setting, black white lines appear on top of the black background parts in the movie, rather sporadically. I have written it out 3 or 4 times, and each time the frequency of the lines is different, but each DVD is unusable. In PAL setting this doesnt happen, but of course the quality is diminished, as the orig. footage was taken on an NTSC camera. I am in Europe, so this PAL/NTSC conversion thing is a neverending problem.... Is this an iDVD problem or a problem with my laptop's burner?
    Daniel

    Dear Tom,
    I appreciate you replying to my post, and am sorry for not getting back to you sooner, but i never received an email notification of a reply.
    The Nattress solution seems like a good route - is this compatible with FC Express 2?
    The purpose of this AVI export is to have the highest possible quality file in data form, which the (PC using) client will then be able to write out onto DVD, convert/edit himself, etc. I have written out the self-contained QuicktimeMovie data file for him, but he is unable to open that. When i write out the AVI file, it is over 4 times as big as the QTmovie file and only plays for the first 18 seconds.
    I am exporting to my internal harddrive (laptop).
    The end goal is to get this file eventually onto a PAL-BETA video. This is where the NTSC-PAL conversion problem comes in, and maybe the Nattress program could be the solution (although it initially seems a bit complicated to me).
    Another important part of this problem, is that iDVD writes out the original NTSC file with funny white lines going across the black backgrounds - so I cant write the best quality NTSC video onto DVD properly either. Each time I write it out, the frequency of these white lines is different. I dont know if this is a related problem, a Final Cut Express export problem, an iDVD problem, or a problem with my DVD writer. (I made the movie, exported it self-contained QTmov, imported it into a new file, did some color-correction, and exported the new final version. - maybe the problem stems from within this simple process? ? ? )
    (Regarding the WMV export: this is not so important, lets not deal with this now. I have flip4mac, downloaded free. My experience is that it doesnt really work.)
    So... any ideas or suggestions?
    i appreciate your help,
    Daniel

  • Byte conversion problem

    240 Decimal ---> F0 Hexa
    but when I do ...
    ((byte) 240) I got -16
    I need to set to a variable F0 and not -16 so
    setPrinterMicrocode( (byte) firmwareVersion ) sets the printerMicrocode to -16 and not F0
    Is there any way to address this issue ?
    Thanks.

    To handle bytes as unsigned values, AND then with the mask 0xFF when they are promoted to an int. That will strip the -sign bits.
    If your code expects a String "F0" vs the decimal value "240" you need to use a method to convert the decimal value to a hex String. Look at the Integer class for a method that does this.

  • File Read and Byte Conversion Efficiency

    Im working on a program that needs to store WAV data.
    2 unsigned bytes Little Endian -> signed Short
    this is my code:
    fis = new BufferedInputStream(new FileInputStream(file), 1764000);
    for(int x = 0; x < wav.samples; x++){
    fis.read(byte2);
    wav.left[i] = (short)b2LEtoInt();
    public int b2LEtoInt(){
    i += (int)(byte2[1] & 0xff) << 8;
    i += (int)(byte2[0] & 0xff);
    if(i > 32767){ i -= 65536; }
    return i;
    }I set the buffer size to 1,764,000 bytes because that is fairly
    large and it is 10 seconds of 44100 16bit stereo WAV data.
    Reading 79,161,264 takes 8282 ms
    Waiting 8 seconds for almost 8 mins of WAV data isnt horrible
    but its markedly worse than WaveLAB or CoolEditPro etc that can
    load the same data and graph it pretty much as quickly as i can
    drag the file onto the screen.
    Is this a Java vs Native code speed problem or a design problem?
    Does anyone have any tips to speed up this loading process?
    I dont know if thats the best 2 byte little endian to short conversion.
    I dont know if im using the right reader / buffersize.
    I dont know how programs like WaveLAB work with wavs.
    Do they load them into memory completely? Are the graphs
    images that are then zoomed into or are they redrawn every
    time you move them?
    Anyone have any expert advice?

    is this right...
    the buffered reader grabs 1,765,000 bytes from the
    file automatically,
    read(byte[]...) then reads [x] many bytes from the
    reader?Yes but if your byte array has only 2 elements this read method will be called (1,765,000 /2) times and that was the problem. You can reduce by increasing the size of the array.
    What the buffered reader does is it minimze the IO blocks which will occure when you actualy read file from the disk buy redusing the niumber of Disk IOs.
    and also read method does not gurrantee that the exact number of bytes that you specify is read from the stream by read method
    (Read the java documentation of InputStream.read(byte[],int,int))
    it says that the maximum number of bytes that will be read is what you specified but the actual number read may be less than that and that depending on the implementation.
    read method return an integer value which is the actuall number of bytes I think you should get it in to a variable and use when processing

  • Problem with type conversion and primary key during row fetch

    [Note, this error occurs in Oracle XE, APEX 2.1.0.00.39]
    I have been having a problem with Automatic Row Fetch:
    ORA-01460: unimplemented or unreasonable conversion requested
    So in an effort to resolve this, I created a PL/SQL process with the query below and was able to isolate the same error. The problem seems to come from one of the primary keys being a "number" type (APP_ID). The error occurs on the line:
    where u.app_id=:P5_APP_ID
    I have tried the following variations on this line in an effort to resolve this, but all generate the same error:
    1) where to_char(u.app_id) = :P5_APP_ID
    2) where u.app_id = to_number(:P5_APP_ID)
    3) where to_char(u.app_id) = to_char(:P5_APP_ID)
    I've also tried the laternate syntax "&__." and "#__#", but these don't function in the Source field and show up as syntax errors.
    Any suggestions are welcome.
    begin
    for r in (
    select app_name, apptype, appcreator, appurl
    from application_users u, application_info i
    where u.app_id=:P5_APP_ID
    and i.app_id=u.app_id
    and u.username=:P5_USERNAME)
    loop
    begin
    :P5_APP_NAME := r.app_name;
    :P5_APPURL := r.appurl;
    exception
    when others then
    raise_application_error(-20000,'In Loop Failure',true);
    end;
    end loop;
    exception
    when others then
    raise_application_error(-20000,'Out of Loop Failure',true);
    end;
    Thanks in advance,
    Barney

    I found a prior post referencing a similar issue and it was solved by using the "v(__)" syntax. This did resolve my issue, however, I have a quick follow-on which I'm hoping someone can answer quickly...
    Since the "v(__)" syntax won't work for the Automatic Row Fetch (at least to the best of my knowledge), I have to do a manual process. However, the manual query as shown above doesn't actually populate any of the form values through the bind variables. They all remain at their cached values from prior data entry on the form.
    Is using the bind variables for assignment incorrect, or is there something that must be done to get the updates to show up in the form (ordering of processes, etc.).
    My manual process is running in the Load: Before Header state so I would have expected it to update all of the fields.
    Thanks in advance,
    Barney

  • Aspect ratio problem with Quicktime Conversion from FCE HD 3.5

    I have a FCE 3.5 HDV project (16:9 aspect ratio) which I am trying to export using Quicktime Conversion for eventual web-streaming. I have tried various settings including "maintain aspect ratio" and the "letterbox" options. After every multi-hour attempt, the end result is just what I need, except the aspect ratio is always 4:3 and vertically squeezed.
    What settings should I use for a small to medium sized version of my movie for streaming on a website, but in the correct aspect ratio? I'd prefer a 16:9 Quicktime frame, or at least a 4:3 Quicktime frame with black bars.

    I too have been having some problems, same software. Export to iPod completely ignores the intended aspect ratio and is non-adjustable and squeezes the footage. It looks fine on the canvas but gets messed up on export. A 4:3 video that should be 640x480 ends up being 640x426, and a 16:9 video that should be 640x360 looks to be getting 640x426 as well.
    Currently, my work-around is to export to DV file, then export to iPod. Being a double encoding, it is quite wasteful in terms of time and processing power. Is there something else I can do?

  • FCC: Problems with content conversion

    Dear all,
    I have a receiver FTP adapter with content conversion. In RWB I'm facing following error message:
    Adapter Framework caught exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'FCOTUPI')', probably configuration error in file adapter (XML parser error)'
    The field with value FCOTUPI could be found in POS recordset. I double check the length of columns but couldn't find
    an error.
    CC configuration:
    Recordset structure: HEADER,POS,SUBPOS
    HEADER.fieldFixedLengths = 8,4,8
    POS.fieldFixedLengths = 8,20,15,3
    SUBPOS.fieldFixedLengths = 5,5
    HEADER.fixedLengthTooShortHandling = Cut
    POS.fixedLengthTooShortHandling = Cut
    SUBPOS.fixedLengthTooShortHandling = Cut
    As you can see by the names, I am using as XML to convert a structure with subnodes. In documentation it said
    that it is not allowed, but in some threads I found the information that structure could be processed.
    Any ideas how to solve this problem?
    Thanks
    Chris

    Dear Amit,
    thanks for your answer. I already checked this blog, but hoped for other solutions.
    My problem: I tried to map my hierarchical structure to a flat structure.
    Source
    Struc1 (0..unbounded)
    -Item1.1
    -Struc2 (0..unbounded)
    --Item 2.1
    --Struc3 (0..unbounded)
    ---Item3.1
    Target:
    Struc1 (0..unbounded)
    -Item1.1
    Struc2 (0..unbounded)
    -Item 2.1
    Struc3 (0..unbounded)
    -Item3.1
    But if e.g. the Struc2 appears two time it will be created two time in target structure before
    the Struc3 is created. But ths Struc3 belongs to Struc2 and should be created in flat file under
    Struc2 directly.
    How can we created a flat structure like this
    Struc1
    Struc2
    Struc3
    Struc3
    Struc2
    Struc3
    Thanks
    Chris

  • Problem with file conversion from version 9.2.2 to version 10.1.0.71

    Hello everyone.
    I have a problem. In my database, i have a lot of artwork done with indesign 9.2.2. Since a while now I upgraded indesign and now I have the latest version 10.1.0.71 but I can't open my indesign artwork made with indesign 9.2.2.
    When I try, a dialog box appear and says : " La conversion a échoué : les données du fichier ne correspondent pas aux données attendues".
    What should I do ?
    Thank you in advance

    Hi,
    Ideally all files created in 9.2.2 should open fine in versions greater than itself.
    Did you happen to have some 3rd party plugin in 9.2.2 which is missing in 10.1 ? That can be one of the reasons for such errors.
    Are the files still opening in version 9.2.2? (assuming you still have 9.2.2)
    If there are no 3rd party plugins involved you can share the file with us at [email protected] and we can have a look and figure out the cause of the problem.
    Regards
    Javed

  • Problems converting byte[] to string

    I use
    byte[] encryptedBytes = cipher.doFinal(bytesToEncrypt);
    String Ciphertext = new String(encryptedBytes);
    and sometimes i get the correct answer ans sometimes no. If yo want the code is in this post:
    http://forum.java.sun.com/thread.jspa?threadID=790137&start=15&tstart=0

    That's because the C language lacks true character and string data types. It only has arrays of bytes. Unfortunately in C bytes are misleadingly called "chars."
    It works if you put ASCII because byte sequences that correspond to ASCII characters can, on most systems, be safely converted to characters and strings. You see, conversions from bytes to characters are done using things called "encoding schemes" or just encodings. If you don't specify an encoding, the system's default is used. The default encoding can be pretty much anything so it's best not to assume much about it.
    You can also use a fixed encoding, like this:String Ciphertext = new String(encryptedBytes, "ISO-8859-1");Just remember that when you convert the string back to bytes you have to use the same encoding again, that isbyte[] cipherBytes = cipherString.getBytes("ISO-8859-1");

  • Replacing 20 fixstatements by Global Variable - Problem 255 bytes length

    Hello,
    we have an issue in businessrules with setting the fix statement on 1 dimension:
    we currently use Fix (@RELATIVE("CBU_ALL",0) ) - on level 0 are approx. 3000 members - on medium level are 20 CBUs Seat and 20 CBUs Door
    we have approx. 20-30 similar businessrules - which either calculate on seat or door CBUs
    the requirement is to either calculate with a rule the 20 CBUs for Seats or the 20 CBUs for Doors
    as we currently do not fix properly on either Seat or Door CBUs, we calculate approx. 1500 empty members (empty, if fix in another dimension done correctly) - tests showed, that this doubles the time which would be needed.
    I know we could easily set 20 fixes in each business rule:
    @RELATIVE("CBU_BMW_Seat",0)
    ....20 more....
    @RELATIVE("CBU_Ford_Seat",0)
    (the fix above would then exclude the 1500 members, which are below:
    @RELATIVE("CBU_BMW_Doors",0)
    ....20 more....
    @RELATIVE("CBU_Ford_Doors",0)
    unfortunately, the number of CBUs/Customers is frequently renamed or some are added, so I can not afford to built these 20 fixstatements into 20 different businessrules and maintain them all the time.
    I thought of using UDAs or Attribute Values -
    but it seems not to be possible in a fixstatment to combine a relative or Children fixstatement with UDAs, which are set on the upper member ?
    I assume it works, if I classify all 3000 level 0 members with UDA or attribute SEATS or DOORS - but that's inefficient
    @RELATIVE("CBU_BMW_Seat",0) AND @UDA(CBU,"SEATS")
    @CHILDREN("CBU_BMW_Seat") AND @UDA(CBU,"SEATS")
    @Descendants("CBU_BMW_Seat") AND @UDA(CBU,"SEATS")
    @UDA(CBU,"SEATS")
    generally, it seems not to be allowed to combine Children or descendant fixes with any other relations or conditions ?
    @CHILDREN(@Match(CBU," Seat") ) (attempt to search for all children of all CBUs with Seat in its name)
    So the idea is to define 2 global variables:
    1 for Seats and 1 for Doors:
    [SEAT] includes then then: @children("CBU_BMW_Seat") ... 20 more @children("CBU_Ford_Seat")
    advantage would be, we can maintain the list of CBUs in 1 place
    my problem is: length of global variable is limited to 255 bytes - I need 800 to 900 digits to define the 20 CBUs
    having 8 global variables instead of 40 CBUs referenced in Fixstatements is not really an advantage
    even if I would rename the CBUs to just S1,S2,S3,S4 D1,D2,D3 (S for Seat, D for Door) (and use aliases in Planning and Reporting with full name to have the right meaning for the users), it does not fit into 1 variable: @children("S1"), @Children("S2"), ..... is simply too long (still 400 digits)
    also other attempts to make the statement shorter, failed:
    @children(@list("CBU_BMW_Seat","CBU_Ford_Seat",.....)) is not allowed
    is there any other idea of using global variables, makros, sequences ?
    is there a workaround to extend global variable limit ? we have release 9.3.1 - is this solved in future releases ?
    are there any other commands, which I can combine in clever way in fixstatements with
    @relative
    @children
    @descendants
    with things like @match @list ?
    (Generation and Level are no approrate criteria for Separating Seat and Doors, as the hierarchy is the same)
    please understand, that as we use this application for 5 years with a lot of historic data and it's a planning application with a lot of webforms and financial reports, and all the CBU members are stored members with calculated totals and access rights and setup data on upper members,
    I can not simply re-group the whole cbu structure and separate Seats and Doors just for calculation performance
    CBU dimension details is like this:
    Generation:
    1 CBU_ALL
    2 CBU_BMW
    3 CBU_BMW_Seat
    4 Product A
    4 Product B
    ..... hundreds more
    3 CBU_BMW_Door
    4 Product C
    4 Product D
    .... hundreds more
    2 CBU_Ford
    3 CBU_Ford_Seat
    4 Product E
    4 Product F
    .... hundreds more
    3 CBU_Ford_Doors
    4 Product G
    4 Product H
    .... hundreds more
    20 more CBUs with below 20 CBUs Seat and 20 CBUs Door

    How hard would it be to insert 2 children under CBU_All? Name them CBU_Seats and CBU_Doors, then group all the Seats and Doors under them.
    Then your calc could be @Relative(CBU_Doors, 0).
    I know it's not always easy or feasible to effect change to a hierarchy, but I just had the thought.
    Robert

  • GetResourceAsStream problems Read(byte[])

    Heres my code. Some images show up fine, others dont show up at all, and others show up as black images when the images are in a jar file. All images show up fine when they are on the lcoal file system. All images DO fit in the ~60kb byte array. Any suggestions on what the problem is, I have worked around my problem but I would like to know what was going on. My work around was to loop inputstream.read() into the byte array and that has worked.
        public static ImageIcon GetImage(String fileName)
            InputStream iStream=null;
            ImageIcon ic = null;
            try
                if( classLoader == null )
                    try
                        classLoader = Class.forName( "myappclass" ).getClassLoader();
                    catch( Exception x)
                        System.out.println( x.toString() );
                        return ic;
                iStream = classLoader.getResourceAsStream( fileName );
                byte[] bytes = new byte[65000];
                iStream.read(bytes);
               //heres around where it goes caplooyey
                ic = new ImageIcon(bytes);
            catch (IOException ex)
    //            iStream.close();
                System.out.println("No existing file to copy");
                return ic;
            return ic;
        }

    Your code is reading the stream before all the data are available so one read will grab only a partial image. One solution would be to use a BufferedInputStream, but that would consume even more memory than your current approach.
    A much simpler, more efficient, and wholly equivalent technique is accomplished with this one line of code:
    ic = new ImageIcon(ClassLoader.getSystemResource(fileName));

  • Problem from FCE conversion to burned DVD

    I've edited a 15 min. film on FCE 3.5. Use quicktime conversion, self-contained to go to IDVD. The self contained film looks fine, burn it, play DVD and the DVD has in some scenes, a "ripple" effect and alot of "interlace" problems. Brought hard drive with film to mac store, burned on their computer same thing happened. So I know its' not mechanical problem with my burner. Something in the conversion, except that when you play converted film in IDVD before burn, it looks fine?
    Help, need to get this film to someone and can't figure out problem.

    What does this mean? Is this a question? Yes, play it back on a TV set. Or does this mean you did play it back on a TV set. If the latter you'll need to go through your entire process to see where the interlacing is being damaged. It should play correctly on a interlaced display.

Maybe you are looking for