-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
优化 提取获取无扩展名的文件名的方法进Utils,方便调用 修复 调用ffmpeg切割视频被PotPlayer识别为音频的问题,相对兼容,遂版本号升至1.1.0 优化 将时间戳转换为秒的方法转移到Utils下,方便调用,符合规范 优化 去除无用的import 更新 发布1.1.0
- Loading branch information
Showing
9 changed files
with
66 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package Utils; | ||
|
||
/** | ||
* 数据类型转换工具类 | ||
* @author AricSun | ||
* @date 2020.10.07 23:02 | ||
*/ | ||
public class DataTypeConverter{ | ||
/* | ||
* function: 将timestamp的PTxx.xxS通过正则匹配出浮点型数据 | ||
* @Param: [timeStamp时间戳] | ||
* @Return: java.lang.Double | ||
*/ | ||
public static Double TimeStamp2Double(String timeStamp){ | ||
return Double.parseDouble(timeStamp.replaceAll("[^\\d.]", "")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package Utils.FileUtils; | ||
|
||
/** | ||
* 文件名工具类 | ||
* @author AricSun | ||
* @date 2020.10.07 22:36 | ||
*/ | ||
public class FilenameUtils { | ||
/* | ||
* function: 获取不带扩展名的文件名 | ||
* @Param [filename文件名] | ||
* @Return java.lang.String | ||
* from: https://my.oschina.net/liting/blog/535479 | ||
*/ | ||
public static String getFilenameWithoutExtension(String filename){ | ||
if ((filename != null) && (filename.length() > 0)){ | ||
int dot = filename.lastIndexOf('.'); | ||
if ((dot > -1) && (dot < filename.length())){ | ||
return filename.substring(0,dot); | ||
} | ||
} | ||
return filename; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters