How can I read a jpg file from an on-line source?
Code:
Scanner into = new Scanner
(new URL(http://s3.amazonaws.com/data.tumblr.com/tumblr_lxla8jWqmv1qzr53co1_1280.jpg).openStream());
FileOutputStream myFile = new FileOutputStream("c://test//test.jpg");
while(into.hasNextByte()==true)
{
myFile.write(into.nextByte());
}
into.close();
The file created has 0 bytes in it.
Why can I read the bytes in this jpg file and write to test.jpg ?
Re: What am I doing wrong here?
Quote:
Originally Posted by
fatabass
What am I doing wrong here?
You're using a meaningless subject header.
db
Re: What am I doing wrong here?
How can I edit the header
Re: What am I doing wrong here?
Edit Post -> Go Advanced should do it.
db