文章标题
来源:互联网 发布:厦门市公安局网络公章 编辑:程序博客网 时间:2024/05/21 09:55
package lq20170409;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class Demo1 {
public static void main(String[] args) {
//函数的调用
}
/**
* byte=8bits
* 1kpbs=1024b/s
* @param source 源文件
* @param path 目标文件
* @param bitMs 比特率(可选中文件,右击鼠标在详细信息中查看)kpbs
* @param start 开始的秒数
* @param off 结束的秒数
*/
public void copyMusic(String source,String path,int bitMs,int start,int off){
BufferedInputStream bis=null;
BufferedOutputStream bos=null;
try {
bis=new BufferedInputStream(new FileInputStream(source));
bos=new BufferedOutputStream(new FileOutputStream(path,true));
byte [] b=new byte[1024];
int len;
int startB=start*bitMs*1024/8;
int end=off*bitMs*1024/8;
int sum=0;
while((len=bis.read(b))!=-1){
sum+=len;
if(sum>startB&&sum
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 自定义注解开发
- 二叉树的最小深度
- connect & send 在三次握手过程中的有趣问题
- leetcodeOJ 43. Multiply Strings
- ThreadLoacal引起的内存泄露
- 文章标题
- 安全测试简介
- Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:错误
- OpenThreads库的使用-Mutex
- 编译领域会议列表
- sublimtext 代码检错插件 sublimelinter 安装
- SPY
- NOI-OpenJudge-2.1-1973确定进制
- Android studio2.3版本 用小米手机无法调试,用模拟器正常调试。Application Installation Failed