介绍一个轻量级java的swf处理库
http://dennis-zane.iteye.com/blog/153678
提取swf文件元信息、压缩swf、解压swf都可以处理,来自于http://www.brooksandrus.com/blog/category/java/,或者直接这里下载。
一个小例子:
Java代码
SWFHeader header = new SWFHeader("G:\\mplayer\\test.swf"); System.out.println("signature: " + header.getSignature()); System.out.println("version: " + header.getVersion()); System.out.println("compression: " + header.getCompressionType()); System.out.println("size: " + header.getSize()); System.out.println("nbits: " + header.getNbits()); System.out.println("xmax: " + header.getXmax()); System.out.println("ymax: " + header.getYmax()); System.out.println("width: " + header.getWidth()); System.out.println("height: " + header.getHeight()); System.out.println("frameRate: " + header.getFrameRate()); System.out.println("frameCount: " + header.getFrameCount());
//压缩 SWFCompressor compressor=new SWFCompressor("G:\\test.swf"); //解压缩 SWFDecompressor decompressor=new SWFDecompressor("G:\\test.swf"); //压缩SWFCompressor compressor=new SWFCompressor("G:\\test.swf");//解压缩SWFDecompressor decompressor=new SWFDecompressor("G:\\test.swf");