From: Hendrik B. <nh...@us...> - 2010-03-03 20:32:09
|
Update of /cvsroot/arianne/unrelated-stuff/src/net/sf/arianne/tools/ipcalc In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31525/src/net/sf/arianne/tools/ipcalc Modified Files: IPCalc.java Log Message: added JavaDoc Index: IPCalc.java =================================================================== RCS file: /cvsroot/arianne/unrelated-stuff/src/net/sf/arianne/tools/ipcalc/IPCalc.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPCalc.java 3 Mar 2010 20:30:08 -0000 1.1 --- IPCalc.java 3 Mar 2010 20:32:01 -0000 1.2 *************** *** 10,14 **** /** * adds some leading '0' to the sting until the length <i>maxDigits</i> is ! * reached * * @param number --- 10,14 ---- /** * adds some leading '0' to the sting until the length <i>maxDigits</i> is ! * reached. * * @param number *************** *** 18,22 **** * @return the expected number */ ! public static String addLeadingZeros(String number, int maxDigits) { StringBuilder result = new StringBuilder(number); --- 18,22 ---- * @return the expected number */ ! static String addLeadingZeros(String number, int maxDigits) { StringBuilder result = new StringBuilder(number); *************** *** 29,33 **** ! private static String ipToHex(String address) { String[] tokens = address.split("\\."); StringBuilder res = new StringBuilder(); --- 29,39 ---- ! /** ! * convers a dotted ip-address to a hexadecimal string. ! * ! * @param address dotted ip-address ! * @return hexadecimal string ! */ ! static String ipToHex(String address) { String[] tokens = address.split("\\."); StringBuilder res = new StringBuilder(); *************** *** 39,43 **** ! private static String hexToIp(String address) { StringBuilder res = new StringBuilder(); for (int i = 0; i < 3; i++) { --- 45,55 ---- ! /** ! * convers a hexadecimal string to a dotted ip-address. ! * ! * @param address hexadecimal string ! * @return dotted ip-address ! */ ! static String hexToIp(String address) { StringBuilder res = new StringBuilder(); for (int i = 0; i < 3; i++) { |