/** * Convenient three-argument version of <code>computeCodebase</code> * that will always return a codebase <code>String</code> represented * in standard <i>http</i> protocol format. */ public static String computeCodebase(String name, String jarFile, int port) throws IOException { return computeCodebase(name, jarFile, port, null, null); }
/** * Creates and returns a <code>String</code> array consisting of the * contents of the given <code>prevArgList</code> and the arguments * reference in the given <code>argString</code>. * <p> * Note that the contents of the <code>argString</code> parameter is * <code>split</code> on the RS (<i>record separator</i>) control * character ("\036"). */ public static String[] createArgList(String[] prevArgList, String argString) { if(argString.matches("^[ \t]*$")) return prevArgList; String[] newArgs = argString.split("\036"); return concat(prevArgList, newArgs); }
/** * Convenient three-argument version of <code>computeCodebase</code> * that takes a <code>String</code> value for the <code>port</code> * parameter, always return a codebase <code>String</code> represented * in standard <i>http</i> protocol format. * * @throws NumberFormatException if the value input for <code>port</code> * does not contain a parsable <code>int</code>. */ public static String computeCodebase(String name, String jarFile, String port) throws IOException { return computeCodebase(name, jarFile, Integer.parseInt(port)); } }
/** * Convenience method that ultimately calls the primary 5-argument * version of this method. This method allows one to input a * <code>String</code> value for the port to use when constructing * the codebase; which can be useful when invoking this method * from a Jini configuration file. * * @throws NumberFormatException if the value input for <code>port</code> * does not contain a parsable <code>int</code>. */ public static String computeCodebase(String name, String jarFile, String port, String srcRoot, String mdAlgorithm) throws IOException { return computeCodebase(name, jarFile, Integer.parseInt(port), srcRoot, mdAlgorithm); }