how to send mp3,avi(large) files via socket...small files with size less than 100kb is possible but how to send large file..
sathya88 0 Junior Poster in Training
Recommended Answers
Jump to PostThe basic mechanism is the same for any size file. Is the data arriving too fast for the client? In that case use the same socket connection to send ready/not ready messages from the client to the server to keep things synchronised.
Jump to PostI see you are reading the whole file into a buffer array before writing it. (Your use of a int for the file length limits you to 2GB anyway). It's more normal to have a sensible sized buffer and use copy blocks from the file to the output stream until …
Jump to Postya working...small size file ok...but how can send larger movie file 700mb
Exception in thread "main" java.lang.OutOfMemoryError: Java heap spaceThat's exactly what I expected. See my previous post for the solution.
All 11 Replies
NormR1 563 Posting Sage Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
sathya88 0 Junior Poster in Training
NormR1 563 Posting Sage Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
sathya88 0 Junior Poster in Training
sathya88 0 Junior Poster in Training
NormR1 563 Posting Sage Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
john321 -6 Newbie Poster
NormR1 563 Posting Sage Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.