本文整理汇总了Java中org.lpw.tephra.util.Validator类的典型用法代码示例。如果您正苦于以下问题:Java Validator类的具体用法?Java Validator怎么用?Java Validator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Validator类属于org.lpw.tephra.util包,在下文中一共展示了Validator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFromInputStream
import org.lpw.tephra.util.Validator; //导入依赖的package包/类
@Override
public String getFromInputStream() {
if (content != null)
return content;
String contentType = request.getHeader("content-type");
if (!BeanFactory.getBean(Validator.class).isEmpty(contentType) && contentType.toLowerCase().contains("multipart/form-data"))
return content = "";
try {
ByteArrayOutputStream output = new ByteArrayOutputStream();
BeanFactory.getBean(Io.class).copy(request.getInputStream(), output);
output.close();
content = output.toString();
return content;
} catch (IOException e) {
BeanFactory.getBean(Logger.class).warn(e, "获取InputStream中的数据时发生异常!");
return "";
}
}
示例2: CookieImpl
import org.lpw.tephra.util.Validator; //导入依赖的package包/类
public CookieImpl(Validator validator, Numeric numeric, DateTime dateTime) {
this.validator = validator;
this.numeric = numeric;
this.dateTime = dateTime;
request = new ThreadLocal<>();
response = new ThreadLocal<>();
}
示例3: ActionBuilder
import org.lpw.tephra.util.Validator; //导入依赖的package包/类
public ActionBuilder() {
validator = BeanFactory.getBean(Validator.class);
array = new JSONArray();
}