?? share.java
字號:
package de.uni_bremen.informatik.p2p.plugins.filesharing.data;
import java.io.File;
import de.uni_bremen.informatik.p2p.plugins.filesharing.control.FileUtilities;
/**
* An object of the class Share represents a share auf the filesharing plugin.
* A share can be a file or a directory.
*
* @author Lars Kordes, Philipp Hoheisel
*/
public class Share {
/** File itself */
public File file;
/** Hash value of the file data. */
public String hash;
/**
* Classconstructor.
*
* @param path Path of the file.
* @param filename Name of the file.
*/
public Share(String path,
String filename) {
this.file = new File(path, filename);
hash = FileUtilities.generateHashString(this.file.getPath());
}
/**
* Creates a new Share object.
*
* @param path Path of object
*/
public Share(String path) {
this.file = new File(path);
hash = FileUtilities.generateHashString(this.file.getPath());
}
/**
* Creates a new Share object.
*
* @param file File to share
*/
public Share(File file) {
this.file = file;
hash = FileUtilities.generateHashString(this.file.getPath());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -