|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jqql.obsolete.FragmentBuffer
public class FragmentBuffer
use to save buffer which send file data, its size and window is same, file fragment sequence begin from 1 if user request get a fragment overflow current area, nothing to do. 用于保存发送文件数据的缓冲区,它的尺寸和滑窗相同,文件分片序号从1开始 如果用户请求得到一个不在当前范围内的分片,则不做处理
Constructor Summary | |
---|---|
FragmentBuffer(RandomAccessFile file,
int size,
int fz,
int max)
constructed function 构造函数 |
Method Summary | |
---|---|
byte[] |
getFragment(int index)
get a fragment array 得到一个分片的数组 |
void |
release(int num)
release num count fragment in front 抛弃最前面的num个分片 |
void |
releaseTo(int index)
release all fragment from low to index( include), rectify low and high value and import a new fragment 抛弃从low到index(包括)为止的所有分片,调整low和high的值并载入新的分片 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FragmentBuffer(RandomAccessFile file, int size, int fz, int max)
file
- RandomAccessFile对象 // RandomAccessFile objectsize
- buffer大小 // buffer sizefz
- 分片大小 // fragment sizemax
- 文件最大的分片序号 // most fragment sequence number of fileMethod Detail |
---|
public byte[] getFragment(int index)
index
- 分片的绝对序号 // fragment absolute sequence number
public void releaseTo(int index)
index
- 分片的绝对序号 // fragment absolute sequence numberpublic void release(int num)
num
-
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |