⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileaccess.java

📁 支持多线程的ftp下载源程序,没有用任何第三方组件
💻 JAVA
字号:
package ext.down;

import java.io.*;

public class FileAccess implements Serializable
{
	RandomAccessFile oSaveFile = null;

	long nPos;

	public FileAccess(String sName, long npos) throws IOException
	{
		oSaveFile = new RandomAccessFile(sName, "rw");
		this.nPos = npos;
		oSaveFile.seek(nPos);
	}

	public synchronized int write(byte[] b, int nStart, int nLen)
	{
		try
		{
			int n = -1;
			oSaveFile.write(b, nStart, nLen);
			n = nLen;
			return n;
		}
		catch (IOException e)
		{
			return -2;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -