Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mmm-rain
AndroidUtilCode
提交
bc7e8cf0
A
AndroidUtilCode
项目概览
mmm-rain
/
AndroidUtilCode
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AndroidUtilCode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bc7e8cf0
编写于
8月 22, 2016
作者:
C
cmj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
see 08/22 log
上级
37a223ae
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
414 addition
and
112 deletion
+414
-112
update_log.md
update_log.md
+1
-1
utilcode/build.gradle
utilcode/build.gradle
+2
-2
utilcode/proguard-rules.pro
utilcode/proguard-rules.pro
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/AppUtils.java
...ode/src/main/java/com/blankj/utilcode/utils/AppUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/DeviceUtils.java
.../src/main/java/com/blankj/utilcode/utils/DeviceUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/FileUtils.java
...de/src/main/java/com/blankj/utilcode/utils/FileUtils.java
+289
-35
utilcode/src/main/java/com/blankj/utilcode/utils/KeyboardUtils.java
...rc/main/java/com/blankj/utilcode/utils/KeyboardUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/NetworkUtils.java
...src/main/java/com/blankj/utilcode/utils/NetworkUtils.java
+11
-11
utilcode/src/main/java/com/blankj/utilcode/utils/PhoneUtils.java
...e/src/main/java/com/blankj/utilcode/utils/PhoneUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/RegularUtils.java
...src/main/java/com/blankj/utilcode/utils/RegularUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/SDCardUtils.java
.../src/main/java/com/blankj/utilcode/utils/SDCardUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/SPUtils.java
...code/src/main/java/com/blankj/utilcode/utils/SPUtils.java
+4
-4
utilcode/src/main/java/com/blankj/utilcode/utils/ScreenUtils.java
.../src/main/java/com/blankj/utilcode/utils/ScreenUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/ShellUtils.java
...e/src/main/java/com/blankj/utilcode/utils/ShellUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/SizeUtils.java
...de/src/main/java/com/blankj/utilcode/utils/SizeUtils.java
+1
-1
utilcode/src/main/java/com/blankj/utilcode/utils/TimeUtils.java
...de/src/main/java/com/blankj/utilcode/utils/TimeUtils.java
+36
-36
utilcode/src/main/java/com/blankj/utilcode/utils/UnclassifiedUtils.java
...ain/java/com/blankj/utilcode/utils/UnclassifiedUtils.java
+1
-1
utilcode/src/test/java/com/blankj/utilcode/utils/FileUtilsTest.java
...rc/test/java/com/blankj/utilcode/utils/FileUtilsTest.java
+34
-0
utilcode/src/test/java/com/blankj/utilcode/utils/TestUtils.java
...de/src/test/java/com/blankj/utilcode/utils/TestUtils.java
+13
-0
utilcode/src/test/res/file/child/GBk.txt
utilcode/src/test/res/file/child/GBk.txt
+1
-0
utilcode/utilcode.iml
utilcode/utilcode.iml
+12
-12
未找到文件。
update_log.md
浏览文件 @
bc7e8cf0
###
#### 16/08/22 SPUtils将commit改为apply提高效率,将SPUtils改为构造函数法创建,
#### 16/08/22 SPUtils将commit改为apply提高效率,将SPUtils改为构造函数法创建,
FileUtils新增查找函数,规范JavaDoc
#### 16/08/21 FileUtils单元测试完毕,修复FileUtils的bug,发布版本1.1.2
#### 16/08/20 更新目录,继续完善FileUtils单元测试,发布版本1.1.1
#### 16/08/19 继续完善FileUtils及单元测试,及其他小修小补(在此感谢vpop的三次Pr)
...
...
utilcode/build.gradle
浏览文件 @
bc7e8cf0
...
...
@@ -7,8 +7,8 @@ android {
defaultConfig
{
minSdkVersion
11
targetSdkVersion
23
versionCode
4
versionName
"1.1.
2
"
versionCode
5
versionName
"1.1.
3
"
}
buildTypes
{
release
{
...
...
utilcode/proguard-rules.pro
浏览文件 @
bc7e8cf0
...
...
@@ -17,5 +17,5 @@
#
}
#-
keep
class
com
.
blankj
.
utilcode
.
**
{
*
;
}
#-
keepclassmembers
class
com
.
blankj
.
utilcode
.
**
{
*
;
}
#-
keep
classmembers
class
com
.
blankj
.
utilcode
.
**
{
*
;
}
#-
dontwarn
com
.
blankj
.
utilcode
.
**
\ No newline at end of file
utilcode/src/main/java/com/blankj/utilcode/utils/AppUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -19,7 +19,7 @@ import java.util.List;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : App相关
的
工具类
* desc : App相关工具类
* </pre>
*/
public
class
AppUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/DeviceUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -16,7 +16,7 @@ import java.io.LineNumberReader;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/1
* desc : 设备相关
的
工具类
* desc : 设备相关工具类
* </pre>
*/
public
class
DeviceUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/FileUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -10,11 +10,13 @@ import java.io.FileNotFoundException;
import
java.io.FileOutputStream
;
import
java.io.FileReader
;
import
java.io.FileWriter
;
import
java.io.FilenameFilter
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
static
com
.
blankj
.
utilcode
.
utils
.
ConstUtils
.
KB
;
...
...
@@ -24,7 +26,7 @@ import static com.blankj.utilcode.utils.ConstUtils.KB;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/11
* desc : 文件相关
的
工具类
* desc : 文件相关工具类
* </pre>
*/
public
class
FileUtils
{
...
...
@@ -33,20 +35,6 @@ public class FileUtils {
throw
new
UnsupportedOperationException
(
"u can't fuck me..."
);
}
/**
* 关闭IO
*
* @param closeable closeable
*/
public
static
void
closeIO
(
Closeable
closeable
)
{
if
(
closeable
==
null
)
return
;
try
{
closeable
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 根据文件路径获取文件
*
...
...
@@ -61,7 +49,7 @@ public class FileUtils {
* 判断文件是否存在
*
* @param filePath 文件路径
* @return {@code
fals
e}: 存在<br>{@code false}: 不存在
* @return {@code
tru
e}: 存在<br>{@code false}: 不存在
*/
public
static
boolean
isFileExists
(
String
filePath
)
{
return
isFileExists
(
getFileByPath
(
filePath
));
...
...
@@ -71,7 +59,7 @@ public class FileUtils {
* 判断文件是否存在
*
* @param file 文件
* @return {@code
fals
e}: 存在<br>{@code false}: 不存在
* @return {@code
tru
e}: 存在<br>{@code false}: 不存在
*/
public
static
boolean
isFileExists
(
File
file
)
{
return
file
!=
null
&&
file
.
exists
();
...
...
@@ -81,7 +69,7 @@ public class FileUtils {
* 判断是否是目录
*
* @param dirPath 目录路径
* @return {@code
fals
e}: 是<br>{@code false}: 否
* @return {@code
tru
e}: 是<br>{@code false}: 否
*/
public
static
boolean
isDir
(
String
dirPath
)
{
return
isDir
(
getFileByPath
(
dirPath
));
...
...
@@ -423,6 +411,213 @@ public class FileUtils {
return
file
!=
null
&&
(!
file
.
exists
()
||
file
.
isFile
()
&&
file
.
delete
());
}
/**
* 获取目录下所有文件
*
* @param dirPath 目录路径
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDir
(
String
dirPath
,
boolean
isRecursive
)
{
return
listFilesInDir
(
getFileByPath
(
dirPath
),
isRecursive
);
}
/**
* 获取目录下所有文件
*
* @param dir 目录
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDir
(
File
dir
,
boolean
isRecursive
)
{
if
(
isRecursive
)
return
listFilesInDir
(
dir
);
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
Collections
.
addAll
(
list
,
files
);
return
list
;
}
/**
* 获取目录下所有文件包括子目录
*
* @param dir 目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDir
(
File
dir
)
{
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
list
.
add
(
file
);
if
(
file
.
isDirectory
())
{
list
.
addAll
(
listFilesInDir
(
file
));
}
}
return
list
;
}
/**
* 获取目录下所有后缀名为suffix的文件
* <p>大小写忽略</p>
*
* @param dirPath 目录路径
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
String
dirPath
,
String
suffix
,
boolean
isRecursive
)
{
return
listFilesInDirWithFilter
(
getFileByPath
(
dirPath
),
suffix
,
isRecursive
);
}
/**
* 获取目录下所有后缀名为suffix的文件
* <p>大小写忽略</p>
*
* @param dir 目录
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
File
dir
,
String
suffix
,
boolean
isRecursive
)
{
if
(
isRecursive
)
return
listFilesInDirWithFilter
(
dir
,
suffix
);
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
if
(
file
.
getName
().
toUpperCase
().
endsWith
(
suffix
.
toUpperCase
()))
{
list
.
add
(
file
);
}
}
return
list
;
}
/**
* 获取目录下所有后缀名为suffix的文件包括子目录
* <p>大小写忽略</p>
*
* @param dirPath 目录路径
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
String
dirPath
,
String
suffix
)
{
return
listFilesInDirWithFilter
(
getFileByPath
(
dirPath
),
suffix
);
}
/**
* 获取目录下所有后缀名为suffix的文件包括子目录
* <p>大小写忽略</p>
*
* @param dir 目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
File
dir
,
String
suffix
)
{
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
if
(
file
.
getName
().
toUpperCase
().
endsWith
(
suffix
.
toUpperCase
()))
{
list
.
add
(
file
);
}
if
(
file
.
isDirectory
())
{
list
.
addAll
(
listFilesInDirWithFilter
(
file
,
suffix
));
}
}
return
list
;
}
/**
* 获取目录下所有符合filter的文件
*
* @param dirPath 目录路径
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
String
dirPath
,
FilenameFilter
filter
,
boolean
isRecursive
)
{
return
listFilesInDirWithFilter
(
getFileByPath
(
dirPath
),
filter
,
isRecursive
);
}
/**
* 获取目录下所有符合filter的文件
*
* @param dir 目录
* @param isRecursive 是否递归进子目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
File
dir
,
FilenameFilter
filter
,
boolean
isRecursive
)
{
if
(
isRecursive
)
return
listFilesInDirWithFilter
(
dir
,
filter
);
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
if
(
filter
.
accept
(
file
.
getParentFile
(),
file
.
getName
()))
{
list
.
add
(
file
);
}
}
return
list
;
}
/**
* 获取目录下所有符合filter的文件包括子目录
*
* @param dirPath 目录路径
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
String
dirPath
,
FilenameFilter
filter
)
{
return
listFilesInDirWithFilter
(
getFileByPath
(
dirPath
),
filter
);
}
/**
* 获取目录下所有符合filter的文件包括子目录
*
* @param dir 目录
* @return 文件链表
*/
public
static
List
<
File
>
listFilesInDirWithFilter
(
File
dir
,
FilenameFilter
filter
)
{
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
if
(
filter
.
accept
(
file
.
getParentFile
(),
file
.
getName
()))
{
list
.
add
(
file
);
}
if
(
file
.
isDirectory
())
{
list
.
addAll
(
listFilesInDirWithFilter
(
file
,
filter
));
}
}
return
list
;
}
/**
* 获取目录下指定文件名的文件包括子目录
* <p>大小写忽略</p>
*
* @param dirPath 目录路径
* @return 文件链表
*/
public
static
List
<
File
>
searchFileInDir
(
String
dirPath
,
String
fileName
)
{
return
searchFileInDir
(
getFileByPath
(
dirPath
),
fileName
);
}
/**
* 获取目录下指定文件名的文件包括子目录
* <p>大小写忽略</p>
*
* @param dir 目录
* @return 文件链表
*/
public
static
List
<
File
>
searchFileInDir
(
File
dir
,
String
fileName
)
{
if
(
dir
==
null
||
!
isDir
(
dir
))
return
null
;
List
<
File
>
list
=
new
ArrayList
<>();
File
[]
files
=
dir
.
listFiles
();
for
(
File
file
:
files
)
{
if
(
file
.
getName
().
toUpperCase
().
equals
(
fileName
.
toUpperCase
()))
{
list
.
add
(
file
);
}
if
(
file
.
isDirectory
())
{
list
.
addAll
(
listFilesInDirWithFilter
(
file
,
fileName
));
}
}
return
list
;
}
/**
* 将输入流写入文件
*
...
...
@@ -695,10 +890,10 @@ public class FileUtils {
*
* @param size 大小
* @param unit <ul>
* <li>
ConstUtils.BYTE:
字节</li>
* <li>
ConstUtils.KB :
千字节</li>
* <li>
ConstUtils.MB :
兆</li>
* <li>
ConstUtils.GB :
GB</li>
* <li>
{@link ConstUtils#BYTE}:
字节</li>
* <li>
{@link ConstUtils#KB} :
千字节</li>
* <li>
{@link ConstUtils#MB} :
兆</li>
* <li>
{@link ConstUtils#GB} :
GB</li>
* </ul>
* @return 大小以unit为单位
*/
...
...
@@ -719,10 +914,10 @@ public class FileUtils {
*
* @param filePath 文件路径
* @param unit <ul>
* <li>
ConstUtils.BYTE:
字节</li>
* <li>
ConstUtils.KB :
千字节</li>
* <li>
ConstUtils.MB :
兆</li>
* <li>
ConstUtils.GB :
GB</li>
* <li>
{@link ConstUtils#BYTE}:
字节</li>
* <li>
{@link ConstUtils#KB} :
千字节</li>
* <li>
{@link ConstUtils#MB} :
兆</li>
* <li>
{@link ConstUtils#GB} :
GB</li>
* </ul>
* @return 文件大小以unit为单位
*/
...
...
@@ -736,10 +931,10 @@ public class FileUtils {
*
* @param file 文件
* @param unit <ul>
* <li>
ConstUtils.BYTE:
字节</li>
* <li>
ConstUtils.KB :
千字节</li>
* <li>
ConstUtils.MB :
兆</li>
* <li>
ConstUtils.GB :
GB</li>
* <li>
{@link ConstUtils#BYTE}:
字节</li>
* <li>
{@link ConstUtils#KB} :
千字节</li>
* <li>
{@link ConstUtils#MB} :
兆</li>
* <li>
{@link ConstUtils#GB} :
GB</li>
* </ul>
* @return 文件大小以unit为单位
*/
...
...
@@ -749,7 +944,32 @@ public class FileUtils {
}
/**
* 根据全路径获取最长目录
* 关闭IO
*
* @param closeable closeable
*/
public
static
void
closeIO
(
Closeable
closeable
)
{
if
(
closeable
==
null
)
return
;
try
{
closeable
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 获取全路径中的最长目录
*
* @param file 文件
* @return filePath最长目录
*/
public
static
String
getDirName
(
File
file
)
{
if
(!
isFileExists
(
file
))
return
""
;
return
getDirName
(
file
.
getPath
());
}
/**
* 获取全路径中的最长目录
*
* @param filePath 文件路径
* @return filePath最长目录
...
...
@@ -761,7 +981,18 @@ public class FileUtils {
}
/**
* 根据全路径获取文件名
* 获取全路径中的文件名
*
* @param file 文件
* @return 文件名
*/
public
static
String
getFileName
(
File
file
)
{
if
(!
isFileExists
(
file
))
return
""
;
return
getFileName
(
file
.
getPath
());
}
/**
* 获取全路径中的文件名
*
* @param filePath 文件路径
* @return 文件名
...
...
@@ -773,10 +1004,21 @@ public class FileUtils {
}
/**
* 根据全路径获取文件名不带拓展名
* 获取全路径中的不带拓展名的文件名
*
* @param file 文件
* @return 不带拓展名的文件名
*/
public
static
String
getFileNameNoExtension
(
File
file
)
{
if
(!
isFileExists
(
file
))
return
""
;
return
getFileNameNoExtension
(
file
.
getPath
());
}
/**
* 获取全路径中的不带拓展名的文件名
*
* @param filePath 文件路径
* @return
文件名不带拓展
名
* @return
不带拓展名的文件
名
*/
public
static
String
getFileNameNoExtension
(
String
filePath
)
{
if
(
StringUtils
.
isSpace
(
filePath
))
return
filePath
;
...
...
@@ -791,8 +1033,20 @@ public class FileUtils {
return
filePath
.
substring
(
lastSep
+
1
,
lastPoi
);
}
/**
* 获取全路径中的文件拓展名
*
* @param file 文件
* @return 文件拓展名
*/
public
static
String
getFileExtension
(
File
file
)
{
if
(!
isFileExists
(
file
))
return
""
;
return
getFileExtension
(
file
.
getPath
());
}
/**
*
根据全路径获取
文件拓展名
*
获取全路径中的
文件拓展名
*
* @param filePath 文件路径
* @return 文件拓展名
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/KeyboardUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -12,7 +12,7 @@ import android.widget.EditText;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 键盘相关
的
工具类
* desc : 键盘相关工具类
* </pre>
*/
public
class
KeyboardUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/NetworkUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -11,7 +11,7 @@ import android.telephony.TelephonyManager;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 网络相关
的
工具类
* desc : 网络相关工具类
* </pre>
*/
public
class
NetworkUtils
{
...
...
@@ -125,10 +125,10 @@ public class NetworkUtils {
* @param context 上下文
* @return 手机制式
* <ul>
* <li>
PHONE_TYPE_NONE
: 0 手机制式未知</li>
* <li>
PHONE_TYPE_GSM
: 1 手机制式为GSM,移动和联通</li>
* <li>
PHONE_TYPE_CDMA
: 2 手机制式为CDMA,电信</li>
* <li>
PHONE_TYPE_SIP
: 3</li>
* <li>
{@link TelephonyManager#PHONE_TYPE_NONE }
: 0 手机制式未知</li>
* <li>
{@link TelephonyManager#PHONE_TYPE_GSM }
: 1 手机制式为GSM,移动和联通</li>
* <li>
{@link TelephonyManager#PHONE_TYPE_CDMA }
: 2 手机制式为CDMA,电信</li>
* <li>
{@link TelephonyManager#PHONE_TYPE_SIP }
: 3</li>
* </ul>
*/
public
static
int
getPhoneType
(
Context
context
)
{
...
...
@@ -145,12 +145,12 @@ public class NetworkUtils {
* @param context 上下文
* @return 网络类型
* <ul>
* <li>
NETWORK_WIFI
= 1;</li>
* <li>
NETWORK_4G
= 4;</li>
* <li>
NETWORK_3G
= 3;</li>
* <li>
NETWORK_2G
= 2;</li>
* <li>
NETWORK_UNKNOWN
= 5;</li>
* <li>
NETWORK_NO
= -1;</li>
* <li>
{@link #NETWORK_WIFI }
= 1;</li>
* <li>
{@link #NETWORK_4G }
= 4;</li>
* <li>
{@link #NETWORK_3G }
= 3;</li>
* <li>
{@link #NETWORK_2G }
= 2;</li>
* <li>
{@link #NETWORK_UNKNOWN}
= 5;</li>
* <li>
{@link #NETWORK_NO }
= -1;</li>
* </ul>
*/
public
static
int
getNetWorkType
(
Context
context
)
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/PhoneUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -24,7 +24,7 @@ import java.util.List;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 手机相关
的
工具类
* desc : 手机相关工具类
* </pre>
*/
public
class
PhoneUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/RegularUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -9,7 +9,7 @@ import static com.blankj.utilcode.utils.ConstUtils.*;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 正则相关
的
工具类
* desc : 正则相关工具类
* </pre>
*/
public
class
RegularUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/SDCardUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -9,7 +9,7 @@ import java.io.File;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/11
* desc : SD卡相关
的
工具类
* desc : SD卡相关工具类
* </pre>
*/
public
class
SDCardUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/SPUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -186,7 +186,7 @@ public class SPUtils {
}
/**
* 获取
sp
中所有键值对
* 获取
SP
中所有键值对
*
* @return Map对象
*/
...
...
@@ -195,7 +195,7 @@ public class SPUtils {
}
/**
* 从
sp
中移除该key
* 从
SP
中移除该key
*
* @param key 键
*/
...
...
@@ -204,7 +204,7 @@ public class SPUtils {
}
/**
* 判断
sp
中是否存在该key
* 判断
SP
中是否存在该key
*
* @param key 键
* @return {@code true}: 存在<br>{@code false}: 不存在
...
...
@@ -214,7 +214,7 @@ public class SPUtils {
}
/**
* 清除所有数据
* 清除
SP中
所有数据
*/
public
void
clear
()
{
editor
.
clear
().
apply
();
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/ScreenUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -20,7 +20,7 @@ import java.lang.reflect.Method;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 屏幕相关
的
工具类
* desc : 屏幕相关工具类
* </pre>
*/
public
class
ScreenUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/ShellUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -11,7 +11,7 @@ import java.util.List;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/7
* desc : Shell
操作
工具类
* desc : Shell
相关
工具类
* </pre>
*/
public
class
ShellUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/SizeUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -11,7 +11,7 @@ import android.view.View;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 尺寸相关
的
工具类
* desc : 尺寸相关工具类
* </pre>
*/
public
class
SizeUtils
{
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/TimeUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -11,7 +11,7 @@ import java.util.Locale;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 时间相关
的
工具类
* desc : 时间相关工具类
* </pre>
*/
public
class
TimeUtils
{
...
...
@@ -300,11 +300,11 @@ public class TimeUtils {
*
* @param milliseconds 毫秒时间戳
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @return unit时间戳
*/
...
...
@@ -327,11 +327,11 @@ public class TimeUtils {
* @param time0 时间字符串1
* @param time1 时间字符串2
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @return unit时间戳
*/
...
...
@@ -346,11 +346,11 @@ public class TimeUtils {
* @param time0 时间字符串1
* @param time1 时间字符串2
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @param format 时间格式
* @return unit时间戳
...
...
@@ -367,11 +367,11 @@ public class TimeUtils {
* @param time0 Date类型时间1
* @param time1 Date类型时间2
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @return unit时间戳
*/
...
...
@@ -426,11 +426,11 @@ public class TimeUtils {
*
* @param time 时间字符串
* @param unit <ul>
* <li>
ConstUtils.MSEC
:毫秒</li>
* <li>
ConstUtils.SEC
:秒</li>
* <li>
ConstUtils.MIN
:分</li>
* <li>
ConstUtils.HOUR
:小时</li>
* <li>
ConstUtils.DAY
:天</li>
* <li>
{@link ConstUtils#MSEC}
:毫秒</li>
* <li>
{@link ConstUtils#SEC }
:秒</li>
* <li>
{@link ConstUtils#MIN }
:分</li>
* <li>
{@link ConstUtils#HOUR}
:小时</li>
* <li>
{@link ConstUtils#DAY }
:天</li>
* </ul>
* @return unit时间戳
*/
...
...
@@ -444,11 +444,11 @@ public class TimeUtils {
*
* @param time 时间字符串
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @param format 时间格式
* @return unit时间戳
...
...
@@ -463,11 +463,11 @@ public class TimeUtils {
*
* @param time Date类型时间
* @param unit <ul>
* <li>
ConstUtils.MSEC:
毫秒</li>
* <li>
ConstUtils.SEC :
秒</li>
* <li>
ConstUtils.MIN :
分</li>
* <li>
ConstUtils.HOUR:
小时</li>
* <li>
ConstUtils.DAY :
天</li>
* <li>
{@link ConstUtils#MSEC}:
毫秒</li>
* <li>
{@link ConstUtils#SEC }:
秒</li>
* <li>
{@link ConstUtils#MIN }:
分</li>
* <li>
{@link ConstUtils#HOUR}:
小时</li>
* <li>
{@link ConstUtils#DAY }:
天</li>
* </ul>
* @return unit时间戳
*/
...
...
utilcode/src/main/java/com/blankj/utilcode/utils/UnclassifiedUtils.java
浏览文件 @
bc7e8cf0
...
...
@@ -12,7 +12,7 @@ import java.util.List;
* author: Blankj
* blog : http://blankj.com
* time : 2016/8/2
* desc : 未归类
的
工具类
* desc : 未归类工具类
* </pre>
*/
public
class
UnclassifiedUtils
{
...
...
utilcode/src/test/java/com/blankj/utilcode/utils/FileUtilsTest.java
浏览文件 @
bc7e8cf0
...
...
@@ -2,7 +2,9 @@ package com.blankj.utilcode.utils;
import
org.junit.Test
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FilenameFilter
;
import
static
com
.
blankj
.
utilcode
.
utils
.
FileUtils
.*;
import
static
com
.
blankj
.
utilcode
.
utils
.
TestUtils
.
BASEPATH
;
...
...
@@ -108,6 +110,32 @@ public class FileUtilsTest {
assertThat
(
deleteFile
(
path
+
"del.txt"
)).
isTrue
();
}
@Test
public
void
testListFilesInDir
()
throws
Exception
{
System
.
out
.
println
(
listFilesInDir
(
path
,
false
).
toString
());
System
.
out
.
println
(
listFilesInDir
(
path
,
true
).
toString
());
}
FilenameFilter
filter
=
new
FilenameFilter
()
{
public
boolean
accept
(
File
dir
,
String
name
)
{
return
name
.
endsWith
(
"k.txt"
);
}
};
@Test
public
void
testListFilesInDirWithFiltere
()
throws
Exception
{
System
.
out
.
println
(
listFilesInDirWithFilter
(
path
,
"k.txt"
,
false
).
toString
());
System
.
out
.
println
(
listFilesInDirWithFilter
(
path
,
"k.txt"
,
true
).
toString
());
System
.
out
.
println
(
listFilesInDirWithFilter
(
path
,
filter
,
false
).
toString
());
System
.
out
.
println
(
listFilesInDirWithFilter
(
path
,
filter
,
true
).
toString
());
}
@Test
public
void
testSearchFile
()
throws
Exception
{
System
.
out
.
println
(
searchFileInDir
(
path
,
"GBK.txt"
).
toString
());
System
.
out
.
println
(
searchFileInDir
(
path
,
"child"
).
toString
());
}
@Test
public
void
testWriteFileFromIS
()
throws
Exception
{
assertThat
(
writeFileFromIS
(
path
+
"NEW.txt"
,
new
FileInputStream
(
path
+
"UTF8.txt"
),
false
))
...
...
@@ -139,6 +167,7 @@ public class FileUtilsTest {
public
void
testReadFile2List
()
throws
Exception
{
System
.
out
.
println
(
readFile2List
(
path
+
"UTF8.txt"
,
""
).
toString
());
System
.
out
.
println
(
readFile2List
(
path
+
"UTF8.txt"
,
"UTF-8"
).
toString
());
System
.
out
.
println
(
readFile2List
(
path
+
"UTF8.txt"
,
2
,
5
,
"UTF-8"
).
toString
());
System
.
out
.
println
(
readFile2List
(
path
+
"UTF8.txt"
,
"GBK"
).
toString
());
}
...
...
@@ -161,21 +190,26 @@ public class FileUtilsTest {
@Test
public
void
testGetDirName
()
throws
Exception
{
assertThat
(
getDirName
(
new
File
(
path
+
"UTF8.txt"
))).
isEqualTo
(
path
);
assertThat
(
getDirName
(
path
+
"UTF8.txt"
)).
isEqualTo
(
path
);
}
@Test
public
void
testGetFileName
()
throws
Exception
{
assertThat
(
getFileName
(
new
File
(
path
+
"UTF8.txt"
))).
isEqualTo
(
"UTF8.txt"
);
assertThat
(
getFileName
(
path
+
"UTF8.txt"
)).
isEqualTo
(
"UTF8.txt"
);
}
@Test
public
void
testGetFileNameNoExtension
()
throws
Exception
{
assertThat
(
getFileNameNoExtension
(
new
File
(
path
+
"UTF8.txt"
))).
isEqualTo
(
"UTF8"
);
assertThat
(
getFileNameNoExtension
(
path
+
"UTF8.txt"
)).
isEqualTo
(
"UTF8"
);
}
@Test
public
void
testGetFileExtension
()
throws
Exception
{
assertThat
(
getFileExtension
(
new
File
(
path
+
"UTF8.txt"
))).
isEqualTo
(
"txt"
);
assertThat
(
getFileExtension
(
path
+
"UTF8.txt"
)).
isEqualTo
(
"txt"
);
System
.
out
.
println
(
new
File
(
path
).
getName
().
endsWith
(
"file"
));
}
}
\ No newline at end of file
utilcode/src/test/java/com/blankj/utilcode/utils/TestUtils.java
浏览文件 @
bc7e8cf0
package
com.blankj.utilcode.utils
;
import
android.content.Context
;
import
org.junit.runner.RunWith
;
import
org.robolectric.RobolectricTestRunner
;
import
org.robolectric.annotation.Config
;
import
org.robolectric.shadows.ShadowApplication
;
import
java.io.File
;
/**
...
...
@@ -10,6 +17,8 @@ import java.io.File;
* desc : 单元测试工具类
* </pre>
*/
@RunWith
(
RobolectricTestRunner
.
class
)
@Config
(
manifest
=
Config
.
NONE
)
public
class
TestUtils
{
private
TestUtils
()
{
...
...
@@ -20,4 +29,8 @@ public class TestUtils {
public
static
final
String
BASEPATH
=
System
.
getProperty
(
"user.dir"
)
+
SEP
+
"src"
+
SEP
+
"test"
+
SEP
+
"res"
+
SEP
;
public
static
Context
getContext
()
{
return
ShadowApplication
.
getInstance
().
getApplicationContext
();
}
}
utilcode/src/test/res/file/child/GBk.txt
0 → 100644
浏览文件 @
bc7e8cf0
GBK
\ No newline at end of file
utilcode/utilcode.iml
浏览文件 @
bc7e8cf0
<?xml version="1.0" encoding="UTF-8"?>
<module
external.linked.project.id=
":utilcode"
external.linked.project.path=
"$MODULE_DIR$"
external.root.project.path=
"$MODULE_DIR$/.."
external.system.id=
"GRADLE"
external.system.module.group=
"com.blankj"
external.system.module.version=
"1.1.
1
"
type=
"JAVA_MODULE"
version=
"4"
>
<module
external.linked.project.id=
":utilcode"
external.linked.project.path=
"$MODULE_DIR$"
external.root.project.path=
"$MODULE_DIR$/.."
external.system.id=
"GRADLE"
external.system.module.group=
"com.blankj"
external.system.module.version=
"1.1.
2
"
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"FacetManager"
>
<facet
type=
"android-gradle"
name=
"Android-Gradle"
>
<configuration>
...
...
@@ -101,42 +101,42 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/poms"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 23 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 23 Platform
(2)
"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"backport-util-concurrent-3.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-ant-tasks-2.1.3"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"backport-util-concurrent-3.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-profile-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"ant-1.8.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"xercesMinimal-1.9.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-settings-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"hamcrest-library-1.3"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"ant-launcher-1.8.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"accessibility-test-framework-2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-commons-5.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"accessibility-test-framework-2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"xpp3_min-1.1.4c"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"wagon-http-lightweight-1.0-beta-6"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"nekohtml-1.9.6.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-5.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"wagon-file-1.0-beta-6"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-5.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-error-diagnostics-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-repository-metadata-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"wagon-provider-api-1.0-beta-6"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"xstream-1.4.8"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"wagon-provider-api-1.0-beta-6"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-util-5.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"bcprov-jdk16-1.46"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"wagon-http-shared-1.0-beta-6"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-model-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"xmlpull-1.1.3.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-artifact-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"error_prone_annotations-2.0.8"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-artifact-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"guava-19.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"truth-0.29"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"robolectric-annotations-3.1.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"icu4j-53.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"robolectric-utils-3.1.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"robolectric-3.1.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"sqlite4java-0.282"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-tree-5.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"sqlite4java-0.282"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"plexus-utils-1.5.15"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-plugin-registry-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"asm-analysis-5.0.1"
level=
"project"
/>
...
...
@@ -145,11 +145,11 @@
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-project-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"vtd-xml-2.11"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"hamcrest-core-1.3"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"plexus-container-default-1.0-alpha-9-stable-1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"junit-4.12"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"shadows-core-v23-3.1.2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"plexus-interpolation-1.11"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"classworlds-1.1-alpha-2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"plexus-container-default-1.0-alpha-9-stable-1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"maven-artifact-manager-2.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"classworlds-1.1-alpha-2"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"plexus-interpolation-1.11"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
scope=
"TEST"
name=
"shadows-core-v23-3.1.2"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录