• Post Reply Bookmark Topic Watch Topic
  • New Topic

problems with gif

 
dharini thyagaraj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
while trying to upload file to the server side, contents of a gif file are not getting displayed properly. ie say for e.g whereever ascii '|' has to appear, a ? appears instead. i'm using the FileWriter class. what is the problem?
regards,
dharini
 
paul wheaton
Trailboss
Posts: 22047
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are trying to upload a file to JavaRanch?
Where?
 
dharini thyagaraj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Paul,
I', not trying to load to javaranch. from a client side on my machine to a server side on my own workplace,when trying to send the gif, this problem is encountered.
warm regards,
dharini
 
paul wheaton
Trailboss
Posts: 22047
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, I'm moving this thread to the I/O forum.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the FileWriter is your problem. It writes char's. A gif is basically a byte[] try changing your stream from FileWriter to BufferedOutputStream and use the methods from it.

------------------
Hope This Helps
Carl Trusiak
 
dharini thyagaraj
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Carl,
thanks for the input. i shall try that.
warm regards,
dharini
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!