public class StackTracer extends Object
| 构造器和说明 |
|---|
StackTracer() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decodeUrl(String url)
URL编码解码
|
static String |
getJarManifestVersion(Class<?> clazz) |
static String |
getJarVersion(Class<?> clazz)
取得指定类所在.jar中MANIFEST.MF标示的版本号
|
static String |
getJarVersion(String className)
取得指定类所在.jar中MANIFEST.MF标示的版本号
|
static Appendable |
printStackTrace(Thread thread,
Appendable builder)
简化方式打印指定线程的调用堆栈
|
static Appendable |
printStackTrace(Throwable e,
Appendable builder)
简化方式打印指定异常的调用堆栈
|
public static final Appendable printStackTrace(Thread thread, Appendable builder)
thread - 要dump的线程,若null则为当前线程builder - 要输出的Appendablepublic static final Appendable printStackTrace(Throwable e, Appendable builder)
e - 要dump的异常builder - 要输出的Appendablepublic static final String getJarVersion(String className)
className - 类名public static final String getJarVersion(Class<?> clazz) throws IOException
clazz - 类IOException - IO异常时抛出public static String decodeUrl(String url) throws UnsupportedEncodingException
url - URL串UnsupportedEncodingException - 不支持的编码时抛出Copyright © 2021. All rights reserved.