I have encrypted video file and while decrypting it i have defined Bytebyte[] input = new byte[1024]; size to written it in output file.
Here i want to write first 1024 bytes in output files while at same time if want to play that video file i can play that output file without waiting to whole file written like video streaming.
when first 1024 bytes written , video file will start playing till whole file will written.
You’ll have to setup your input stream and output stream depending on where you’re getting the data and where you’re saving/viewing it. Performance could also likely be improved with some buffering on the output. You should get the general idea.