Hi all , Is there any way we can clip any file (viz audio,video,text) as per the user specific requirments. I mean if the total file size is of 10 MB and I want to clip the file in such a way that I will get 3 different files of sizes 3 MB , 3MB and 4 MB . Is it possible to achive this . What are those API through which I can play around with files. Any link ,white paper will be appriciated Regards Samir
Note that although it is easy to manipulate binary files with the java.io package classes, you can't arbitrarily cut image and audio files and still maintain the header information that tells applications how to treat them.
posted 12 years ago
Thanks a lot William So in short there is no way we can randomly cut the files ...is that so ???
thanks Rob, yess....I am aware of the fact that lot of things needs to be done when we clip the file ....especially with the header portion ..... Do you know the specific API or package in java which id dedicated for the same. Any white paper , link will be appreciated Thanks and regards Samir
Since each file format will have its own unique properties, your best bet would be to search for a specific file format to find utilities that can be used to manipulate it. Several image formats can be read and written by javax.imageio and resizing can be done with the standard Java API (again, search is your friend) You could always use Runtime.exec() to spawn off external processes. In the Linux world we have some very useful utilities like lame, mplayer and imagemagick