ParamUtils.java
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:2k
- /*
- * Created on 2005-10-7
- * Made In GamVan
- */
- package com.gamvan.util;
- import javax.servlet.http.HttpServletRequest;
- import com.gamvan.tools.TypeChange;
- /**
- *
- * @author GamVan by 我容易么我
- * Powered by GamVan.com
- */
- public class ParamUtils {
- public static String getStringParameter(HttpServletRequest request,
- String name)
- {
- String str = "";
- str = TypeChange.nullOfString(request.getParameter(name));
- return str;
- }
-
-
- public static int getIntParameter(HttpServletRequest request,
- String name)
- {
- int i = TypeChange.stringToInt(request.getParameter(name));
- return i ;
- }
-
-
- public static double getDoubleParameter(HttpServletRequest request,
- String name)
- {
- double d = TypeChange.stringToDouble(request.getParameter(name));
- return d;
- }
-
- public static boolean getBooleanParameter(HttpServletRequest request,
- String name)
- {
- boolean b = TypeChange.stringToBoolean(request.getParameter(name));
- return b;
- }
-
- public static long getLongParameter(HttpServletRequest request,
- String name)
- {
- long l = TypeChange.stringToLong(request.getParameter(name));
- return l;
- }
-
-
- public static byte getByteParameter(HttpServletRequest request,
- String name)
- {
- byte b = TypeChange.stringToByte(request.getParameter(name));
- return b;
- }
-
- public static short getShortParameter(HttpServletRequest request,
- String name)
- {
- short s = TypeChange.stringToShort(request.getParameter(name));
- return s;
- }
-
- }