文件上传下载需要的jar包 java文件上传下载 源码 http://blog.csdn.net/da_zhuang/article/details/8737618
2023-11-02 07:01:09 2.11MB 文件上传下载 jar包
1
用于android连接ftp数据库,进行下载上传所使用的jar包
2023-06-04 16:05:31 67KB ftp下载jar包
1
Netty 5.0.0.Alpha2 版本,包含:Jar包+源代码+API文档。 官网Netty 5.0版本已经废弃,所以发布出来,方便大家下载。 《Netty权威指南》一书使用的就是Netty 5.0
2023-03-21 10:23:43 9.72MB Netty
1
根据网上寻找的资料,加上自己的整合,打包的一个Android多线程下载。可以实现断点下载,暂停继续取消下载,能够显示现在已完成大小,文件大小,完成度,下载速度等。使用方法如下: public class MainActivity extends Activity implements OnClickListener,DownloadListener{ private static final String TAG = "MainActivity"; private static final String SD_PATH = Environment.getExternalStorageDirectory().getPath(); private boolean isPause = false; private MultiThreadDownload multiThreadDownload ; private Button buttonDownload; private Button buttonCancel; private TextProgressBar progressBarTest;//可以使用普通的进度,该进度条是可以显示现在完成度 private TextView textInfo; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);//布局文件就是两个简单的按钮一个用于暂停继续下载,一个用于取消任务,还有一个文本用于显示已完成,文件大小,下载完成度,下载速度等信息以及一个进度条。 //http://d1.apk8.com:8020/game/plantsvszombies2.apk buttonDownload = (Button)findViewById(R.id.buttonDownload); buttonDownload.setText("单击下载"); buttonDownload.setOnClickListener(this); progressBarTest = (TextProgressBar) findViewById(R.id.progressBarTest); textInfo = (TextView) findViewById(R.id.textInfo); buttonCancel = (Button) findViewById(R.id.buttonCancel); buttonCancel.setOnClickListener(this); } @Override public void onClick(View v) { String downloadUrl = "http://dldir1.qq.com/invc/qqpinyin/QQInput4.1_1133(1001).apk"; String savePath = SD_PATH+File.separator+"downloadHelper"+File.separator; String fileName = "QQInput.apk"; switch(v.getId()){ case R.id.buttonDownload: if(!isPause){ multiThreadDownload = new MultiThreadDownload(MainActivity.this,downloadUrl, savePath, fileName, this); multiThreadDownload.start(); buttonDownload.setText("下载..."); isPause = true; }else{ buttonDownload.setText("暂停..."); isPause = false; multiThreadDownload.onPause(); multiThreadDownload = null; } break; case R.id.buttonCancel: if(multiThreadDownload==null){ multiThreadDownload = new MultiThreadDownload(MainActivity.this,downloadUrl, savePath, fileName, this); } Log.d(TAG, ""+multiThreadDownload.isDownload()); if(multiThreadDownload.isDownload()){ multiThreadDownload.onCancel(); isPause = false; } multiThreadDownload = null; break; } } private Handler multiHandler = new Handler(){ @Override public void handleMessage(Message msg) { super.handleMessage(msg); if(msg.what==1){ Bundle data = msg.getData(); float downloadSpeed = data.getFloat("downloadSpeed"); boolean speedHigh = false; if(downloadSpeed>500){ speedHigh = true; downloadSpeed/=1024; } progressBarTest.setProgress(data.getInt("completedSize")); textInfo.setText(String.format("已完成:%.2fMB", data.getInt("completedSize")/1024f/1024)+"/"+ String.format("总大小:%.2fMB", data.getInt("fileSize")/1024f/1024)+"\n"+ String.format("进度:%.2f%%", data.getBoolean("isCompleted")?100.00:data.getFloat("downloadPercent"))+"/"+ String.format(speedHigh?"速度:%.2fM/S":"速度:%.2fKB/S", downloadSpeed)); if(data.getBoolean("isCompleted")){ buttonDownload.setText("下载完成"); textInfo.setText("下载完成"); } } } }; @Override public void onDownloading(boolean isCompleted,boolean isPause,boolean isCancel,int fileSize,int completedSize,int downloadedSize,float downloadPercent, float downloadSpeed) { Log.d("MainActivity", isCompleted+"||"+isPause+"||"+completedSize+"||"+downloadedSize+"||"+downloadPercent+"||"+downloadSpeed); Message message = Message.obtain(); message.what = 1; Bundle data = new Bundle(); data.putBoolean("isCancel", isCancel); data.putBoolean("isCompleted", isCompleted); data.putInt("fileSize", fileSize); data.putInt("completedSize", completedSize); data.putInt("downloadedSize", downloadedSize); data.putFloat("downloadPercent", downloadPercent); data.putFloat("downloadSpeed", downloadSpeed); message.setData(data); multiHandler.sendMessage(message); } @Override public void onBeforeDownload(boolean isCompleted,boolean isPause,boolean isCancel,int fileSize){ progressBarTest.setMax(fileSize); } @Override public void onAfterDownload(boolean isCompleted,boolean isPause,boolean isCancel,int fileSize){ } @Override public void onPause(boolean isCompelted,boolean isPause,boolean isCancel,int fileSize,int completedSize,int downloadedSize,float downloadPercent,float downloadSpeed){ textInfo.setText("暂停..."); Log.d(TAG, "暂停..."); } @Override public void onCancelDownload(){ progressBarTest.setProgress(0); textInfo.setText("下载取消"); buttonDownload.setText("重新下载"); } }
2022-03-10 19:42:52 22KB Android 多线程 下载
1
主要介绍了Maven入门之使用Nexus搭建Maven私服及上传下载jar包,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
2021-11-05 11:10:30 2.18MB Nexus搭建Maven私服 Maven 打包jar上传 Maven
1
commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar文件上传下载jar包
2021-09-29 22:36:06 125KB 文件上传下载
1
Netty 5.0.0.Alpha1 版本,包含:Jar包+源代码+API文档。 官网Netty 5.0版本已经废弃,所以发布出来,方便大家下载。 《Netty权威指南》一书使用的就是Netty 5.0
2021-07-09 17:16:25 6.02MB Netty
1
commons-lang.jar是日常编程中必不可少的一个jar包,在日常java编程中,经常会使用到commons-lang.jar包,还没有准备commons-lang.jar包的用户可以前来下载使用,这里为大家提供了commons-lang3-3.1.jar
2021-07-02 18:16:03 287KB commons-lang3-3 下载 jar包
1
google出的 Android下绘制各类图的工具包,和对应的开发文档。最新官方下载。具体的使用方法见我的博客
2021-07-02 01:40:09 485KB 绘图 官方 最新 免费
1
上传下载所需jar包,commons-fileupload-1.3.1.jar和commons-io-2.4.jar
2021-06-17 02:30:54 225KB jar
1