setvalue.java

来自「一个JAVA实现的文件切割工具」· Java 代码 · 共 44 行

JAVA
44
字号
import java.io.*;

public class SetValue implements Serializable {
	private  int oneCutByte=10620000;//切块内的基本拷贝速度10620000
	private  boolean delTishi=true;//删除提示
	private  boolean useWindows=false;//是否使用传统风络标题栏
	
	public void give(int c,boolean a,boolean b,FileOutputStream outStream)throws IOException{
		this.oneCutByte=c;
		this.delTishi=a;
		this.useWindows=b;
		this.writeTOFile(outStream);
	}
	public int getCopyLen() {

		return oneCutByte;

	}

	public boolean getDelTishi() {

		return delTishi;

	}

	public boolean getuseWindows() {

		return useWindows;

	}
	public void writeTOFile(FileOutputStream outStream)throws IOException{
		ObjectOutputStream ooStream=new ObjectOutputStream(outStream);
		ooStream.writeObject(this);
		ooStream.flush();
	}
	public void readFromFile(FileInputStream inStream)throws IOException,ClassNotFoundException{
		ObjectInputStream oiStream=new ObjectInputStream(inStream);
		SetValue s=(SetValue)oiStream.readObject();
		this.oneCutByte=s.oneCutByte;
		this.delTishi=s.delTishi;
		this.useWindows=s.useWindows;
	}
}

⌨️ 快捷键说明

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