public class BeetlUtil extends Object
| 构造器和说明 |
|---|
BeetlUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
autoFileFunctionRegister(GroupTemplate gt,
File funtionRoot,
String ns,
String path,
String functionSuffix) |
static boolean |
checkNameing(String str)
check 命名合法性
|
static int[] |
getLog() |
static String |
getParameterDescription(Class[] types) |
static String |
getRelPath(String siblings,
String resourceId)
相对路径计算
|
static String |
getWebRoot()
返回Web根路径,如果存在自定义webroot路径,则返回自定义webroot
|
static Writer |
getWriterByByteWriter(ByteWriter byteWriter) |
static boolean |
isOutsideOfRoot(String child)
判断一个路径是否指到外部了,比如../..
|
static String |
reportChineseTokenError(String msg) |
static void |
setWebroot(String webroot)
自定义WebRoot路径
|
static RuntimeException |
throwCastException(ClassCastException ex,
GroupTemplate gt) |
protected static String webroot
public static boolean isOutsideOfRoot(String child)
child - public static String getRelPath(String siblings, String resourceId)
siblings - 当前路径resourceId - 相对路径public static Writer getWriterByByteWriter(ByteWriter byteWriter)
public static void setWebroot(String webroot)
public static String getWebRoot()
public static boolean checkNameing(String str)
str - 需要check的字符串public static int[] getLog()
public static RuntimeException throwCastException(ClassCastException ex, GroupTemplate gt)
public static void autoFileFunctionRegister(GroupTemplate gt, File funtionRoot, String ns, String path, String functionSuffix)
Copyright © 2018. All rights reserved.