URL Jpeg Saving

Discussion in 'Java' started by Crouchinho, Nov 6, 2006.

  1. Crouchinho

    Crouchinho Guest

    Why, when I get a jpeg with InputStream and save it with FileOutputStream is
    the jpeg image all mushed up? Is an endian or signed thing? The code is

    FileOutputStream fo

    URL get inputstream

    while read inputstream dump in fo
     
    Crouchinho, Nov 6, 2006
    #1
    1. Advertising

  2. Crouchinho wrote:
    > Why, when I get a jpeg with InputStream and save it with FileOutputStream is
    > the jpeg image all mushed up?


    It'd be your code.

    >...Is an endian or signed thing?


    No.

    >...The code is
    >
    > FileOutputStream fo
    >
    > URL get inputstream
    >
    > while read inputstream dump in fo


    Well that explains it, that code does not compile..

    (..but don't forget to flush!)

    Andrew T.
     
    Andrew Thompson, Nov 6, 2006
    #2
    1. Advertising

  3. Crouchinho wrote:
    [...]
    > The code is
    >
    > FileOutputStream fo
    > URL get inputstream
    > while read inputstream dump in fo


    Are these 3 lines really your code???
    Or is it a summary of your code, from which you expect us to reconstruct
    your real code by some sort of mind-reading?

    --
    Thomas
     
    Thomas Fritsch, Nov 6, 2006
    #3
  4. Crouchinho

    Tom Forsmo Guest

    Crouchinho wrote:
    > Why, when I get a jpeg with InputStream and save it with FileOutputStream is
    > the jpeg image all mushed up? Is an endian or signed thing? The code is
    >
    > FileOutputStream fo
    >
    > URL get inputstream
    >
    > while read inputstream dump in fo


    I'll bet it's the endian thing. It can't be your code, it just can't :)

    tom
     
    Tom Forsmo, Nov 8, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MCP
    Replies:
    1
    Views:
    2,553
    Marco Schmidt
    Jul 3, 2003
  2. Oliver
    Replies:
    8
    Views:
    2,054
    Oliver
    Sep 22, 2005
  3. Replies:
    6
    Views:
    439
  4. lovaspillando
    Replies:
    0
    Views:
    1,037
    lovaspillando
    Aug 26, 2007
  5. Ivan Alameda Carballo
    Replies:
    0
    Views:
    498
    Ivan Alameda Carballo
    Aug 26, 2007
Loading...

Share This Page