资源简介
java写的播放器+所有源代码和图片配置文件等,作者开源了,这里给作者推广一下
代码片段和文件信息
package com.ctreber.aclib.codec;
import java.io.IOException;
/**
*
* Byte stream decoder for 1 2 and 4 byte values in big or little endian
* format.
*
* @author © Christian Treber ct@ctreber.com
*/
public abstract class AbstractDecoder {
/** Highest order byte comes first. */
public static final int BIG_ENDIAN = 0;
/** Lowest order byte comes first. */
public static final int LITTLE_ENDIAN = 1;
/** Determines the byte order in multi byte values. */
private int _endianness = BIG_ENDIAN;
protected long _pos;
/** Static buffer to read values w/o allocating an array every time. */
private final byte[] _readBuf = new byte[4];
/**
* @return A one byte value (aka BYTE unsigned char)
* @throws java.io.IOException
*/
public short readUInt1() throws IOException {
return (short) readValue(1);
}
/**
* @return A two byte value (aka WORD unsigned short)
* @throws java.io.IOException
*/
public int readUInt2() throws IOException {
return (int) readValue(2);
}
/**
* @return A four byte value (aka DWORD unsigned long).
* @throws java.io.IOException
*/
public long readUInt4() throws IOException {
return readValue(4);
}
/**
* @param pEndianess
* The byte order
* @see #BIG_ENDIAN
* @see #LITTLE_ENDIAN
*/
public void setEndianess(final int pEndianess) {
_endianness = pEndianess;
}
/**
* @return Current position in file
*/
public long getPos() {
return _pos;
}
/**
* @param pPos
* Position to advance to. Nothing will happen if the position
* has already been passed.
* @throws java.io.IOException
*/
public abstract void seek(long pPos) throws IOException;
/**
* Implemented by a specific decoder.
* @param pBytes
* Bytes to read
* @param pBuffer
* The buffer to write the read bytes to. If null a buffer is
* reserved.
* @return Array with the bytes read.
* @throws java.io.IOException
*/
public abstract byte[] readBytes(long pBytes byte[] pBuffer)
throws IOException;
protected long readValue(final int pBytes) throws IOException {
readBytes(pBytes _readBuf);
if (pBytes == 1) {
// Shortcut: endianness plays no role here.
return _readBuf[0] & 0xFF;
}
long lValue = 0;
if (_endianness == BIG_ENDIAN) {
for (int lByteNo = 0; lByteNo < pBytes; lByteNo++) {
lValue <<= 8;
lValue += _readBuf[lByteNo] & 0xff;
}
} else {
for (int lByteNo = pBytes - 1; lByteNo >= 0; lByteNo--) {
lValue <<= 8;
lValue += _readBuf[lByteNo] & 0xff;
}
}
return lValue;
}
/**
* Cal
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-05-16 10:15 yoyo\
目录 0 2009-08-02 00:27 yoyo\lib\
文件 46725 2009-08-02 00:27 yoyo\lib\commons-codec-1.3.jar
文件 305001 2009-08-02 00:27 yoyo\lib\commons-httpclient-3.1.jar
文件 52915 2009-08-02 00:27 yoyo\lib\commons-logging-1.1.jar
文件 26202 2009-08-02 00:27 yoyo\lib\commons-logging-api.jar
文件 266881 2009-08-02 00:27 yoyo\lib\examples.jar
文件 103640 2009-08-02 00:27 yoyo\lib\jflac-1.2.jar
文件 105446 2009-08-02 00:27 yoyo\lib\jl1.0.jar
文件 138975 2009-08-02 00:27 yoyo\lib\jmactritonusspi1.74.jar
文件 288699 2009-08-02 00:27 yoyo\lib\jna.jar
文件 6839 2009-08-02 00:27 yoyo\lib\jogg-0.0.7.jar
文件 58917 2009-08-02 00:27 yoyo\lib\jorbis-0.0.15.jar
文件 99833 2009-08-02 00:27 yoyo\lib\jspeex0.9.7.jar
文件 161477 2009-08-02 00:27 yoyo\lib\junit-4.4.jar
文件 12578 2009-08-02 00:27 yoyo\lib\kj_dsp1.1.jar
文件 24538 2009-08-02 00:27 yoyo\lib\mp3spi1.9.4.jar
文件 102723 2009-08-02 00:27 yoyo\lib\tritonus_share.jar
文件 13776 2009-08-02 00:27 yoyo\lib\vorbisspi1.0.2.jar
文件 3477 2009-08-02 00:32 yoyo\ReadMe.txt
文件 24 2012-05-15 22:33 yoyo\run.bat
目录 0 2009-08-02 18:45 yoyo\YOYOPla
文件 3298 2008-12-27 20:15 yoyo\YOYOPla
文件 2812 2008-12-27 20:15 yoyo\YOYOPla
文件 205 2008-12-27 20:15 yoyo\YOYOPla
文件 3353 2008-12-27 20:15 yoyo\YOYOPla
目录 0 2009-08-02 18:46 yoyo\YOYOPla
文件 46725 2008-12-27 20:14 yoyo\YOYOPla
文件 305001 2008-12-27 20:14 yoyo\YOYOPla
文件 52915 2008-12-27 20:14 yoyo\YOYOPla
文件 26202 2008-12-27 20:14 yoyo\YOYOPla
............此处省略556个文件信息
相关资源
- java版及时聊天系统仿QQ制作源码
- jsp人才招聘网站 2010年我的毕业设计
- MQTT推送简单服务端java代码实现
- Java+TCPIP+Socket编程(中文版) pdf 高清
- 车辆租赁管理信息系统
- Java程序设计与源代码
- java交友项目源码
- java订餐系统源代码
- Java NIO (中文版).pdf
- Java超市管理系统源代码-毕业设计-各
- 开源 java 神经网络 验证码识别软件
- 基于Java的企业门户网站源代码
- Android天气预报源代码 自动定位 仿3
- Java json jar包 包括全部6个包 可以直接
- Java Servlet Programming
- JAVA WEB投票系统源码
- JLS 8 java代码规范JLS第8版
- javaweb企业门户网站
- hibernate3所需完整jar包
- android小说阅读器项目源代码
- JAVA+SQL离散数学题库管理系统(源代码
- 基于JAVA CS远程监控系统软件的实现(
- 基于JAVA的网络通讯系统设计与实现论
- JAVA3D的网络三维技术的设计与实现(
- Java电子商务系统
- 农行web端网银支付java接口文件及dem
- java学生信息管理系统学生信息管理系
- jboss-javassist-javassist-rel_3_23_0_ga-2-gf85
- 大学生竞赛管理系统.zip
- java简单实现用户登录功能
评论
共有 条评论