开发者

How to convert Bystream Video to file video in java

I'm build a project to convert video to byte stream, doing some encryption, and convert agaian stream that have been encrypting into video file. I am using mpeg video..

Anybody know how to convert from byte stream to file video? in case, mpeg file...thanks bef开发者_开发知识库ore


To convert a file into a byte stream, simply open it using FileInputStream.

FileInputStream fis = new FileInputStream ("filename.mov");

You'll probably want to buffer it as video files are quite large

BufferedInputStream bis = new BufferedInputStream (fis);

To write out the file, simply open it using FileOutputStream:

FileOutputStream fos = new FileOutputStream ("fileout.mov");

and then write to it using the FileOutputStream.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜