@@ -0,0 +1,1090 @@
+package hyweb.jo.util;%0D%0A%0D%0Apublic class Cast %7B%0D%0A%0D%0A    public static int asInt(Object o, int dv) %7B%0D%0A        if (o instanceof Number) %7B%0D%0A            return ((Number) o).intValue();%0D%0A        %7D else if (o instanceof String) %7B%0D%0A            try %7B%0D%0A                String text = (String) o;%0D%0A                return Integer.parseInt(text.trim());%0D%0A            %7D catch (Exception e) %7B%0D%0A                return dv;%0D%0A            %7D%0D%0A        %7D%0D%0A        return dv;%0D%0A    %7D%0D%0A%0D%0A    public static int asInt(Object%5B%5D params, int idx, int dv) %7B%0D%0A        Object o = (params != null && params.length %3E idx) ? params%5Bidx%5D : null;%0D%0A%0D%0A        return asInt(o, dv);%0D%0A    %7D%0D%0A%0D%0A    public static String asString(Object o, String dv) %7B%0D%0A        if (o instanceof String) %7B%0D%0A            return ((String) o).trim();%0D%0A        %7D else if (o != null) %7B%0D%0A            return o.toString();%0D%0A        %7D%0D%0A        return dv;%0D%0A    %7D%0D%0A%0D%0A    public static String asString(Object%5B%5D params, int idx, String dv) %7B%0D%0A        Object o = (params != null && params.length %3E idx) ? params%5Bidx%5D : null;%0D%0A        return asString(o, dv);%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

base-line