From: <ty...@us...> - 2003-12-09 15:55:58
|
Update of /cvsroot/junk/junk/WEB-INF/classes/junk/util In directory sc8-pr-cvs1:/tmp/cvs-serv20486 Modified Files: NetFile.java Log Message: Index: NetFile.java =================================================================== RCS file: /cvsroot/junk/junk/WEB-INF/classes/junk/util/NetFile.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NetFile.java 17 Nov 2003 19:39:59 -0000 1.1.1.1 --- NetFile.java 9 Dec 2003 15:55:54 -0000 1.2 *************** *** 26,31 **** ! public class NetFile{ ! private String location; private ArrayList path; --- 26,30 ---- ! public class NetFile { private String location; private ArrayList path; *************** *** 36,50 **** private String createDate; private String lastOnline; // private String online; private Boolean online; // private String linkPrefix; ! ! ! public NetFile(String location){ this.location = location; path = new ArrayList(); } ! ! public NetFile(){ location = ""; ip = ""; --- 35,49 ---- private String createDate; private String lastOnline; + // private String online; private Boolean online; + // private String linkPrefix; ! public NetFile(String location) { this.location = location; path = new ArrayList(); } ! ! public NetFile() { location = ""; ip = ""; *************** *** 54,64 **** lastOnline = ""; fullname = ""; // linkPrefix = ""; path = new ArrayList(); online = Boolean.FALSE; } ! ! ! public void setLocation(String location){ int countTokens = 0; String aktToken = ""; --- 53,64 ---- lastOnline = ""; fullname = ""; + + // linkPrefix = ""; path = new ArrayList(); online = Boolean.FALSE; } ! ! public void setLocation(String location) { int countTokens = 0; String aktToken = ""; *************** *** 66,159 **** location = location.substring(6); this.location = location; ! ! StringTokenizer t = new StringTokenizer(location,"/"); countTokens = t.countTokens(); ! ! while(t.hasMoreTokens()){ ! if (countTokens == t.countTokens()){ ! this.ip = t.nextToken(); ! } ! else if (t.countTokens() == 1){ String tmpName = t.nextToken(); this.fullname = tmpName; ! if(tmpName.length() <= 43) this.name = tmpName; ! else this.name = tmpName.substring(0,20) + "..." + tmpName.substring(tmpName.length()-20); ! } ! else{ aktToken = t.nextToken(); ! fullPath += aktToken + "/"; ! path.add(new FileMap(aktToken,fullPath)); ! } ! } } ! public void setName(String name){ this.name = name; } ! ! public void setSize(String size){ ! this.size = size ; // String.valueOf(Long.parseLong(size)/1048576); } ! ! public void setCreateDate(String createDate){ this.createDate = createDate; } ! ! public void setLastOnline(String lastOnline){ this.lastOnline = lastOnline; } ! ! public void setIp(String ip){ this.ip = ip; } ! ! public String getIp(){ return this.ip; } ! ! public String getLocation(){ return this.location; } ! public String getName(){ return this.name; } ! ! public String getSize(){ return this.size; } ! ! public String getCreateDate(){ return this.createDate; } ! ! public String getLastOnline(){ return this.lastOnline; ! } ! ! public ArrayList getPath(){ return this.path; } ! ! public void setPath(ArrayList path){ this.path = path; ! } ! ! public void setFullname(String fullname){ this.fullname = fullname; } ! ! public String getFullname(){ return this.fullname; } ! ! public void setOnline(Boolean online){ this.online = online; } ! ! public Boolean getOnline(){ return this.online; } ! ! } ! --- 66,160 ---- location = location.substring(6); this.location = location; ! ! StringTokenizer t = new StringTokenizer(location, "/"); countTokens = t.countTokens(); ! ! while (t.hasMoreTokens()) { ! if (countTokens == t.countTokens()) { ! this.ip = t.nextToken(); ! } else if (t.countTokens() == 1) { String tmpName = t.nextToken(); this.fullname = tmpName; ! ! if (tmpName.length() <= 43) { ! this.name = tmpName; ! } else { ! this.name = tmpName.substring(0, 20) + "..." ! + tmpName.substring(tmpName.length() - 20); ! } ! } else { aktToken = t.nextToken(); ! fullPath += (aktToken + "/"); ! path.add(new FileMap(aktToken, fullPath)); ! } ! } } ! public void setName(String name) { this.name = name; } ! ! public void setSize(String size) { ! this.size = size; // String.valueOf(Long.parseLong(size)/1048576); } ! ! public void setCreateDate(String createDate) { this.createDate = createDate; } ! ! public void setLastOnline(String lastOnline) { this.lastOnline = lastOnline; } ! ! public void setIp(String ip) { this.ip = ip; } ! ! public String getIp() { return this.ip; } ! ! public String getLocation() { return this.location; } ! public String getName() { return this.name; } ! ! public String getSize() { return this.size; } ! ! public String getCreateDate() { return this.createDate; } ! ! public String getLastOnline() { return this.lastOnline; ! } ! ! public ArrayList getPath() { return this.path; } ! ! public void setPath(ArrayList path) { this.path = path; ! } ! ! public void setFullname(String fullname) { this.fullname = fullname; } ! ! public String getFullname() { return this.fullname; } ! ! public void setOnline(Boolean online) { this.online = online; } ! ! public Boolean getOnline() { return this.online; } ! } \ No newline at end of file |