• Post Reply Bookmark Topic Watch Topic
  • New Topic

Download an object using url with the help of socket  RSS feed

 
emanuel smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I want to download objects (css , jpeg, html ,png ) using sockets in java without using httpurlconnection . How can i do this with the help of simple socket library ?


 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you not want to use httpurlconnection? It's the obvious, easy approach.
 
emanuel smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Why do you not want to use httpurlconnection? It's the obvious, easy approach.



Because i want to try it out using my own http handling code
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, start by reading the HTTP specifications listed at http://www.coderanch.com/how-to/java/SpecificationUrls#httpRfc - that why you know what to send, and what to expect back in response. If you want to implement HTTP yourself, you don't need any library - the java.net package comes with all the classes you need (like java.net.Socket).
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope it isn't too late to welcome you to the Ranch
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!