public class XUtil extends Object
| 构造器和说明 |
|---|
XUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
base64Decode(String text) |
String |
base64Encode(String text)
base64
|
String |
cfgGet(String name)
配置获取
|
String |
cfgGet(String name,
String def) |
boolean |
cfgSet(String name,
String value)
配置设置
|
String |
codeByRandom(int len)
生成随机码
|
BufferedImage |
codeToImage(String code)
字符码转为图片
|
org.noear.weed.DbContext |
db(String cfg)
生成数据库上下文
|
org.noear.weed.DbContext |
db(String cfg,
org.noear.weed.DbContext def) |
List<Object> |
empList() |
Map<String,Object> |
empMap() |
Set<Object> |
empSet() |
Set<String> |
executorList() |
boolean |
extendDel(String name) |
List<Map<String,Object>> |
extendList() |
boolean |
fileFlush(String path,
boolean is_del) |
boolean |
fileFlush(String path,
boolean is_del,
String label,
String note) |
boolean |
fileNew(int fid,
org.noear.solon.core.XContext ctx)
新建文件
|
boolean |
fileSet(int fid,
String fcontent)
文件设置内容
|
String |
guid()
生成GUID
|
String |
htmlEncode(String str) |
org.noear.solonjt.utils.HttpUtils |
http(String url) |
String |
img2String(String data) |
String |
imgGet(String path)
获取图片内容
|
byte[] |
imgGetBytes(String path) |
String |
imgOutName(org.noear.solon.core.XContext ctx,
String filename) |
String |
imgSet(String content,
String contentType,
String extension)
保存图片(内容,类型,后缀名可自定义)
|
String |
imgSet(String content,
String contentType,
String extension,
String name) |
String |
imgSet(String content,
String contentType,
String extension,
String name,
String label) |
String |
imgSet(org.noear.solon.core.XFile file)
保存图片
|
String |
imgSet(org.noear.solon.core.XFile file,
String extension)
保存图片(后缀名可自定义)
|
String |
imgSet(org.noear.solon.core.XFile file,
String tag,
String dir,
int name_mod) |
String |
imgUpd(String path,
String content)
修改图片
|
List<Map<String,Object>> |
interfaceList() |
String |
ip() |
boolean |
isNumber(String str) |
String |
liveTime(Date date) |
boolean |
loadJar(String path,
String data64,
String data_md5,
String plugin) |
String |
localAddr() |
boolean |
log(Map<String,Object> data) |
String |
md5(String str) |
String |
md5(String str,
String charset) |
List<Map<String,Object>> |
menuGet(String label,
int pid) |
List<Object> |
newList() |
List<Object> |
newList(Object[] ary) |
Map<String,Object> |
newMap()
新建集合
|
OutputStream |
newOutputStream() |
Set<Object> |
newSet() |
org.noear.solon.core.XFile |
newXfile() |
org.noear.snack.ONode |
oNode(Object obj) |
PagingModel |
paging(org.noear.solon.core.XContext ctx,
int pageSize) |
PagingModel |
paging(org.noear.solon.core.XContext ctx,
int pageSize,
boolean fixedSize) |
boolean |
restart() |
String |
sha1(String str) |
String |
sha1(String str,
String charset) |
boolean |
sharedAdd(String key,
Object obj) |
boolean |
sharedHas(String key) |
int |
statusSet(int status) |
InputStream |
streamOutToIn(OutputStream outStream) |
String |
streamToString(InputStream inStream) |
String |
stringOf(Object obj) |
InputStream |
stringToStream(String str) |
Object |
thumbnailOf(InputStream stream) |
String |
urlDecode(String str) |
String |
urlEncode(String str) |
public static final XUtil g
public String guid()
public String ip()
public org.noear.weed.DbContext db(String cfg, org.noear.weed.DbContext def) throws Exception
Exceptionpublic OutputStream newOutputStream()
public org.noear.solon.core.XFile newXfile()
public org.noear.solonjt.utils.HttpUtils http(String url)
public List<Map<String,Object>> menuGet(String label, int pid) throws Exception
Exceptionpublic String imgSet(org.noear.solon.core.XFile file, String tag, String dir, int name_mod) throws Exception
Exceptionpublic String imgSet(org.noear.solon.core.XFile file, String extension) throws Exception
Exceptionpublic String imgSet(String content, String contentType, String extension) throws Exception
Exceptionpublic String imgSet(String content, String contentType, String extension, String name) throws Exception
Exceptionpublic String imgSet(String content, String contentType, String extension, String name, String label) throws Exception
Exceptionpublic String imgOutName(org.noear.solon.core.XContext ctx, String filename) throws Exception
Exceptionpublic boolean fileNew(int fid,
org.noear.solon.core.XContext ctx)
throws Exception
Exceptionpublic boolean fileFlush(String path, boolean is_del)
public boolean restart()
public boolean sharedHas(String key)
public boolean extendDel(String name)
public String codeByRandom(int len)
public BufferedImage codeToImage(String code) throws Exception
Exceptionpublic String streamToString(InputStream inStream) throws Exception
Exceptionpublic InputStream streamOutToIn(OutputStream outStream) throws Exception
Exceptionpublic InputStream stringToStream(String str) throws Exception
Exceptionpublic PagingModel paging(org.noear.solon.core.XContext ctx, int pageSize)
public PagingModel paging(org.noear.solon.core.XContext ctx, int pageSize, boolean fixedSize)
public Object thumbnailOf(InputStream stream)
public boolean isNumber(String str)
public boolean loadJar(String path, String data64, String data_md5, String plugin) throws Exception
ExceptionCopyright © 2019. All rights reserved.