好象jmf已经支持mp3了,去sun那边找找文档吧
解决方案 »
- String.getBytes(),迷茫在编码上,来人帮忙呀!
- 为什么用JAVA
- 常在网页代码中看到<%@ %>请问在@里面可以包含些什么内容呢
- iis和tomcat整合后,请求参数全部丢失
- 在s2sh中使用hibernate注解测试时报错
- 苍天哪,大地呢.conn.close()到底要放到哪里呀!
- 不使用Action execute方法的ActionForward进行页面跳转是否会有问题?
- 小妹请教:我以WEBLOGIC做WEB服务器.IPLANET做目录服务器.在配置WEBLOGIC与LDAP服务连接时遇到困难,请高手指点.在线等!急
- 关于Servlet不能正常的在IE中运行的问题!!!!
- Tomcat的虚拟目录的设置问题.
- 毕业生就业信息跟踪系统
- ajax+JSP无刷新上传图片,给个例子
/**
* TRAILER
at end of file - 128 bytes
offset type len name
--------------------------------------------
0 char 3 "TAG"
3 char 30 title
33 char 30 artist
63 char 30 album
93 char 4 year
97 char 30 comments
127 byte 1 genre
--------------------------------------------*/
public static void readMp3ID3V1(String fp) throws Exception{
byte[] buf = new byte[1024];
File file = new File(fp); FileInputStream fis = new FileInputStream(file);
/*---读取MP3文件尾部信息,并显示----*/
long size = file.length();
fis.skip(size-128);
//标志位TAG 3 byte
fis.read(buf,0,3);
String tag = new String(buf,0,3);
System.out.println("ID3V1: "+tag);
//歌曲名称 30 byte
fis.read(buf,0,30); int len = seekNz(buf,30);
String name = new String(buf,0,len);
System.out.println("song name: "+name);
//歌手名称 30 byte
fis.read(buf,0,30);
len = seekNz(buf,30);
name = new String(buf,0,len);
System.out.println("singer name: "+name);
//专辑名称 30 byte
fis.read(buf,0,30);
len = seekNz(buf,30);
name = new String(buf,0,len);
System.out.println("album name: "+name);
//年代 4 byte
fis.read(buf,0,4);
name = new String(buf,0,4);
System.out.println("year :"+name);
//comment 30 byte
fis.read(buf,0,30);
len = seekNz(buf,30);
name = new String(buf,0,len);
System.out.println("comment: "+name);
//genre 1 byte
fis.read(buf,0,1);
// name = new String(buf,0,30);
System.out.println("Genre: "+buf[0]);
fis.close(); }
seekNz()方法在那里啊!