• Post Reply Bookmark Topic Watch Topic
  • New Topic

convert vector to array of bytes  RSS feed

 
chop ficaro
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had a program that could get almost any web address and save the file it returned, but it didnt work for php generated addresses. the reason was that my code depended on there being a contentLength attribute, and there is none generated for things like this (like a google search). so i used an if statement to test weather there was one, and if there wasnt, instead of using a buffered read, i tried to read the contents one byte at a time. i had to use a vector for this because again, the contentLength wasnt known. now im stuck with a vector and i dont know how to get it into the file.

 
chop ficaro
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found a solution
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chop ficaro wrote:

Please check your private messages for an important administrative matter
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!