This content has been marked as final. Show 2 replies
That would work. Check out the socket tutorial on how to read data from a socket: http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
Although writing to a file isn't really streaming a video, it's more like download and play. If you want to do real streaming (like a continuous surveillance video camera feed, or videoconferencing, where you can't wait for the end of the file), that's more complicated. For real streaming, I'd start by googling for java video streaming, maybe someone has a more direct reference...?
writing the file wouldn't be streaming the video, i was more thinking along the lines that it would give the streaming effect. because i am wanting to send a video from a server to display on a client. but if i pull the whole video into a byte and then send it to be written to a file, it becomes a slow process, and can take about 2 mins for files that are only 4,000kb. so i wondered if by sending it in like 300-400kb chunks and writing to the file if that would work.
also if i were to do it that way, if the video were to hit the end of the file before it was completely sent, would it then stop or would it pause?
thanks for your help