• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Sending an image on network..  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get some idea on how to transfer an image on network, like encoding and decoding..

Thanx in advance
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if it is possible or not but you should make an object that implement serializable(able to travel throught the wires) and the fastet way is to send it via java socket.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm not sure if it is possible or not but you should make an object that implement serializable(able to travel throught the wires) and the fastet way is to send it via java socket.



And the object must NOT extend Image because that one is not serializable...
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, if I want to save an image by "serialization", I store (and retrieve) the data from the image in an instance of this class. Not the sharpest tool int the box, but it serves me well! I hope you can use this.


 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gosh, hasn't any one heard about ImageIO?
 
Ko Wey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageIO of course!!!

this program reads an image from file("test.jpg"),
then sends it to yourself(localhost) .... ends receives it and shows it!

so make an image "test.jpg", save in working directory,
compile ImagePost.java and run,
it should work!



 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!