package up6.store;

import java.io.IOException;
import java.io.RandomAccessFile;

/**
 * 数据读取器
 * @author qwl
 *
 */
public class FileBlockReader {
	
	/**
	 * 读取数据
	 * @param pathSvr
	 * @param offset
	 * @param size
	 * @return
	 */
	public byte[] read(String pathSvr,long offset,long size)
	{
		byte[] data = new byte[0];
		try {
			RandomAccessFile raf = new RandomAccessFile(pathSvr,"r");			
			data = new byte[(int)size];
			raf.read(data, 0, (int)size);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}//定位索引
		return data;
	}
}
