• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The size of a file to read

 
Niklas Junel
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way of telling how big a file is, before I start to read from it? I'm trying to read over a httpconnection.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could always have seperate service(Serlvet) you call first that returns the size of a file, then call the other service to get the file.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you set the filesize in the Response Header and retreive it from there before getting the actual file?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic