庄周梦蝶

生活、程序、未来
   :: 首页 ::  ::  :: 聚合  :: 管理

介绍一个轻量级java的swf处理库

Posted on 2008-01-04 11:46 dennis 阅读(2991) 评论(3)  编辑  收藏 所属分类: java
    提取swf文件元信息、压缩swf、解压swf都可以处理,来自于http://www.brooksandrus.com/blog/category/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:\\mplayer\\test.swf");
//解压缩
SWFDecompressor decompressor=new SWFDecompressor("G:\\mplayer\\test.swf");





评论

# re: 介绍一个轻量级java的swf处理库  回复  更多评论   

2008-08-25 09:09 by wmcoo
顶个,找了N久

# re: 介绍一个轻量级java的swf处理库  回复  更多评论   

2012-11-07 15:39 by TechZi
再解压某些swf文件时会造成线程挂起

# runtasticproapk48137  回复  更多评论   

2015-03-29 10:37 by Charging aside, that is ' and even then the batter
Charging aside, that is ' and even then the battery life is about five days. While exercising you can monitor your heart rate through a visual graph and numerical display. The Runtastic Orbit is also versatile, available with a black and blue band plus a clip so it can be worn in more discrete locations.

只有注册用户登录后才能发表评论。


网站导航: