├── AppServer
├── .classpath
├── .myeclipse
│ └── profiler
│ │ └── AppServer on Tomcat 7.x.xml
├── .project
├── .settings
│ ├── .jsdtscope
│ ├── com.genuitec.eclipse.j2eedt.core.prefs
│ ├── org.eclipse.core.resources.prefs
│ ├── org.eclipse.jdt.core.prefs
│ ├── org.eclipse.wst.common.component
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.wst.jsdt.ui.superType.container
│ └── org.eclipse.wst.jsdt.ui.superType.name
├── WebContent
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── WEB-INF
│ │ ├── lib
│ │ │ ├── commons-beanutils-1.8.0.jar
│ │ │ ├── commons-codec-1.8.jar
│ │ │ ├── commons-collections-3.1.jar
│ │ │ ├── commons-collections-3.2.jar
│ │ │ ├── commons-lang-2.4.jar
│ │ │ ├── commons-logging-1.1.1.jar
│ │ │ ├── ehcache-1.2.3.jar
│ │ │ ├── ezmorph-1.0.3.jar
│ │ │ ├── json-lib-2.2.3-jdk15.jar
│ │ │ ├── json.jar
│ │ │ └── sun.misc.BASE64Decoder.jar
│ │ └── web.xml
│ └── index.jsp
├── build
│ └── classes
│ │ └── com
│ │ └── tgb
│ │ └── lk
│ │ └── demo
│ │ └── appserver
│ │ ├── SynDataServlet.class
│ │ ├── SynTxtDataServlet.class
│ │ └── UploadFileServlet.class
└── src
│ └── com
│ └── tgb
│ └── lk
│ └── demo
│ └── appserver
│ ├── SynDataServlet.java
│ ├── SynTxtDataServlet.java
│ └── UploadFileServlet.java
├── README.md
└── UploadTool
├── .gradle
└── 2.10
│ ├── taskArtifacts
│ ├── cache.properties
│ ├── cache.properties.lock
│ ├── fileHashes.bin
│ ├── fileSnapshots.bin
│ ├── outputFileStates.bin
│ └── taskArtifacts.bin
│ └── tasks
│ └── _app_compileDebugJavaWithJavac
│ ├── localClassSetAnalysis
│ ├── localClassSetAnalysis.bin
│ └── localClassSetAnalysis.lock
│ └── localJarClasspathSnapshot
│ ├── localJarClasspathSnapshot.bin
│ └── localJarClasspathSnapshot.lock
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── libraries
│ ├── android_async_http_1_4_8.xml
│ ├── commons_codec_1_8.xml
│ ├── sun_misc_BASE64Decoder.xml
│ ├── support_annotations_23_3_0.xml
│ └── support_v4_23_3_0.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── workspace.xml
├── UploadTool.iml
├── app
├── app.iml
├── build.gradle
├── build
│ ├── generated
│ │ └── source
│ │ │ ├── buildConfig
│ │ │ ├── androidTest
│ │ │ │ └── debug
│ │ │ │ │ └── com
│ │ │ │ │ └── ke
│ │ │ │ │ └── uploadtol
│ │ │ │ │ └── test
│ │ │ │ │ └── BuildConfig.java
│ │ │ └── debug
│ │ │ │ └── com
│ │ │ │ └── ke
│ │ │ │ └── uploadtol
│ │ │ │ └── BuildConfig.java
│ │ │ └── r
│ │ │ └── debug
│ │ │ └── com
│ │ │ └── ke
│ │ │ └── uploadtol
│ │ │ └── R.java
│ ├── intermediates
│ │ ├── blame
│ │ │ └── res
│ │ │ │ └── debug
│ │ │ │ ├── multi
│ │ │ │ ├── values-sw720dp-land-v13.json
│ │ │ │ ├── values-v11.json
│ │ │ │ ├── values-v14.json
│ │ │ │ └── values.json
│ │ │ │ └── single
│ │ │ │ ├── drawable-hdpi-v4.json
│ │ │ │ ├── drawable-mdpi-v4.json
│ │ │ │ ├── drawable-xhdpi-v4.json
│ │ │ │ ├── drawable-xxhdpi-v4.json
│ │ │ │ ├── layout.json
│ │ │ │ └── menu.json
│ │ ├── exploded-aar
│ │ │ └── com.android.support
│ │ │ │ └── support-v4
│ │ │ │ └── 23.3.0
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── aapt
│ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── aidl
│ │ │ │ └── android
│ │ │ │ │ └── support
│ │ │ │ │ └── v4
│ │ │ │ │ ├── media
│ │ │ │ │ ├── MediaMetadataCompat.aidl
│ │ │ │ │ ├── RatingCompat.aidl
│ │ │ │ │ └── session
│ │ │ │ │ │ ├── MediaSessionCompat.aidl
│ │ │ │ │ │ ├── ParcelableVolumeInfo.aidl
│ │ │ │ │ │ └── PlaybackStateCompat.aidl
│ │ │ │ │ └── os
│ │ │ │ │ └── ResultReceiver.aidl
│ │ │ │ ├── annotations.zip
│ │ │ │ └── jars
│ │ │ │ ├── classes.jar
│ │ │ │ └── libs
│ │ │ │ └── internal_impl-23.3.0.jar
│ │ ├── incremental
│ │ │ ├── compileDebugAidl
│ │ │ │ └── dependency.store
│ │ │ ├── compileDebugAndroidTestAidl
│ │ │ │ └── dependency.store
│ │ │ ├── mergeDebugAndroidTestAssets
│ │ │ │ └── merger.xml
│ │ │ ├── mergeDebugAndroidTestResources
│ │ │ │ └── merger.xml
│ │ │ ├── mergeDebugAndroidTestShaders
│ │ │ │ └── merger.xml
│ │ │ ├── mergeDebugAssets
│ │ │ │ └── merger.xml
│ │ │ ├── mergeDebugResources
│ │ │ │ └── merger.xml
│ │ │ └── mergeDebugShaders
│ │ │ │ └── merger.xml
│ │ ├── manifest
│ │ │ └── androidTest
│ │ │ │ └── debug
│ │ │ │ └── AndroidManifest.xml
│ │ ├── manifests
│ │ │ └── full
│ │ │ │ └── debug
│ │ │ │ └── AndroidManifest.xml
│ │ ├── res
│ │ │ ├── merged
│ │ │ │ └── debug
│ │ │ │ │ ├── drawable-hdpi-v4
│ │ │ │ │ ├── fileke.png
│ │ │ │ │ ├── folderke.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ └── icon.png
│ │ │ │ │ ├── drawable-mdpi-v4
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xhdpi-v4
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── drawable-xxhdpi-v4
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── layout
│ │ │ │ │ ├── activity_main.xml
│ │ │ │ │ ├── chose_all_files.xml
│ │ │ │ │ ├── chose_file.xml
│ │ │ │ │ ├── line.xml
│ │ │ │ │ └── popup.xml
│ │ │ │ │ ├── menu
│ │ │ │ │ └── main.xml
│ │ │ │ │ ├── values-sw720dp-land-v13
│ │ │ │ │ └── values-sw720dp-land-v13.xml
│ │ │ │ │ ├── values-v11
│ │ │ │ │ └── values-v11.xml
│ │ │ │ │ ├── values-v14
│ │ │ │ │ └── values-v14.xml
│ │ │ │ │ └── values
│ │ │ │ │ └── values.xml
│ │ │ ├── resources-debug-androidTest.ap_
│ │ │ └── resources-debug.ap_
│ │ └── symbols
│ │ │ └── debug
│ │ │ └── R.txt
│ └── outputs
│ │ └── logs
│ │ └── manifest-merger-debug-report.txt
├── libs
│ ├── android-async-http-1.4.8.jar
│ ├── commons-codec-1.8.jar
│ └── sun.misc.BASE64Decoder.jar
├── src.zip
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ ├── com
│ │ └── ke
│ │ │ └── uploadtol
│ │ │ ├── activity
│ │ │ ├── ChoseFileToolActivity.java
│ │ │ ├── ChoseFolderToolActivity.java
│ │ │ └── MainActivity.java
│ │ │ └── tool
│ │ │ ├── FileAccessI.java
│ │ │ ├── HttpUtils.java
│ │ │ ├── OpenSharedPerferences.java
│ │ │ └── UploadTool.java
│ └── common
│ │ ├── FileUtiles.java
│ │ ├── StreamReader.java
│ │ └── net
│ │ ├── HttpRequest.java
│ │ ├── HttpResponse.java
│ │ ├── HttpUtils.java
│ │ ├── Method.java
│ │ └── test
│ │ └── Test.java
│ └── res
│ ├── drawable-hdpi
│ ├── fileke.png
│ ├── folderke.png
│ ├── ic_launcher.png
│ └── icon.png
│ ├── drawable-mdpi
│ └── ic_launcher.png
│ ├── drawable-xhdpi
│ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ └── ic_launcher.png
│ ├── layout
│ ├── activity_main.xml
│ ├── chose_all_files.xml
│ ├── chose_file.xml
│ ├── line.xml
│ └── popup.xml
│ ├── menu
│ └── main.xml
│ ├── values-sw600dp
│ └── dimens.xml
│ ├── values-sw720dp-land
│ └── dimens.xml
│ ├── values-v11
│ └── styles.xml
│ ├── values-v14
│ └── styles.xml
│ └── values
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── build
├── generated
│ └── mockable-android-17.jar
└── intermediates
│ └── dex-cache
│ └── cache.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── import-summary.txt
├── local.properties
└── settings.gradle
/AppServer/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/AppServer/.myeclipse/profiler/AppServer on Tomcat 7.x.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | true
6 | 2
7 | 10
8 | 4
9 | com.tgb.lk.demo.appserver.**
10 |
11 | com.tgb.lk.demo.appserver.*
12 | true
13 | 0
14 | -1
15 |
16 |
--------------------------------------------------------------------------------
/AppServer/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | AppServer
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 | com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
30 |
31 |
32 |
33 |
34 |
35 | org.eclipse.wst.common.project.facet.core.builder
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | org.eclipse.wst.validation.validationbuilder
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | com.genuitec.eclipse.ast.deploy.core.deploymentnature
55 | org.eclipse.jem.workbench.JavaEMFNature
56 | org.eclipse.wst.common.modulecore.ModuleCoreNature
57 | org.eclipse.wst.common.project.facet.core.nature
58 | org.eclipse.jdt.core.javanature
59 | org.eclipse.wst.jsdt.core.jsNature
60 | org.eclipse.wst.common.project.facet.core.nature
61 | org.eclipse.wst.common.modulecore.ModuleCoreNature
62 | org.eclipse.jem.workbench.JavaEMFNature
63 |
64 |
65 |
--------------------------------------------------------------------------------
/AppServer/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/AppServer/.settings/com.genuitec.eclipse.j2eedt.core.prefs:
--------------------------------------------------------------------------------
1 | defaultTldInfo=f\=http\://java.sun.com/jsf/core;http\://java.sun.com/jsf/html\=h;http\://struts.apache.org/tags-bean\=bean;http\://java.sun.com/jsp/jstl/fmt\=fmt;nested\=http\://struts.apache.org/tags-nested;bean\=http\://struts.apache.org/tags-bean;http\://java.sun.com/jsp/jstl/sql\=sql;c\=http\://java.sun.com/jsp/jstl/core;fmt\=http\://java.sun.com/jsp/jstl/fmt;http\://struts.apache.org/tags-logic\=logic;http\://java.sun.com/jsp/jstl/xml\=x;http\://java.sun.com/jsp/jstl/core\=c;logic\=http\://struts.apache.org/tags-logic;h\=http\://java.sun.com/jsf/html;http\://struts.apache.org/tags-tiles\=tiles;http\://java.sun.com/jsp/jstl/functions\=fn;tiles\=http\://struts.apache.org/tags-tiles;sql\=http\://java.sun.com/jsp/jstl/sql;http\://struts.apache.org/tags-html\=html;http\://struts.apache.org/tags-nested\=nested;html\=http\://struts.apache.org/tags-html;http\://java.sun.com/jsf/core\=f;fn\=http\://java.sun.com/jsp/jstl/functions;x\=http\://java.sun.com/jsp/jstl/xml
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//WebContent/index.jsp=UTF-8
3 |
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6 | org.eclipse.jdt.core.compiler.compliance=1.8
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12 | org.eclipse.jdt.core.compiler.source=1.8
13 |
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/AppServer/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/AppServer/WebContent/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-beanutils-1.8.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-beanutils-1.8.0.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-codec-1.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-codec-1.8.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-collections-3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-collections-3.1.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-collections-3.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-collections-3.2.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-lang-2.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-lang-2.4.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/ehcache-1.2.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/ehcache-1.2.3.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/ezmorph-1.0.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/ezmorph-1.0.3.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/json-lib-2.2.3-jdk15.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/json-lib-2.2.3-jdk15.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/json.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/json.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/lib/sun.misc.BASE64Decoder.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/WebContent/WEB-INF/lib/sun.misc.BASE64Decoder.jar
--------------------------------------------------------------------------------
/AppServer/WebContent/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | SynTxtDataServlet
10 | com.tgb.lk.demo.appserver.SynTxtDataServlet
11 |
12 |
13 | SynDataServlet
14 | com.tgb.lk.demo.appserver.SynDataServlet
15 |
16 |
17 | UploadFileServlet
18 | com.tgb.lk.demo.appserver.UploadFileServlet
19 |
20 |
21 |
22 |
23 |
24 | UploadFileServlet
25 | /UploadFileServlet
26 |
27 |
28 | SynDataServlet
29 | /SynDataServlet
30 |
31 |
32 | SynTxtDataServlet
33 | /SynTxtDataServlet
34 |
35 |
36 |
37 | index.jsp
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/AppServer/WebContent/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 | pageEncoding="ISO-8859-1"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 |
11 | 111199
12 |
13 |
14 |
--------------------------------------------------------------------------------
/AppServer/build/classes/com/tgb/lk/demo/appserver/SynDataServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/build/classes/com/tgb/lk/demo/appserver/SynDataServlet.class
--------------------------------------------------------------------------------
/AppServer/build/classes/com/tgb/lk/demo/appserver/SynTxtDataServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/build/classes/com/tgb/lk/demo/appserver/SynTxtDataServlet.class
--------------------------------------------------------------------------------
/AppServer/build/classes/com/tgb/lk/demo/appserver/UploadFileServlet.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/build/classes/com/tgb/lk/demo/appserver/UploadFileServlet.class
--------------------------------------------------------------------------------
/AppServer/src/com/tgb/lk/demo/appserver/SynDataServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/src/com/tgb/lk/demo/appserver/SynDataServlet.java
--------------------------------------------------------------------------------
/AppServer/src/com/tgb/lk/demo/appserver/SynTxtDataServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/src/com/tgb/lk/demo/appserver/SynTxtDataServlet.java
--------------------------------------------------------------------------------
/AppServer/src/com/tgb/lk/demo/appserver/UploadFileServlet.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/AppServer/src/com/tgb/lk/demo/appserver/UploadFileServlet.java
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # uploadFile
2 | android 大文件分隔上传
3 |
4 | android 大文件分隔上传
5 | 详见:http://blog.csdn.net/jdsjlzx/article/details/43540379
6 |
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/cache.properties:
--------------------------------------------------------------------------------
1 | #Thu Apr 21 09:51:07 CST 2016
2 |
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/cache.properties.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/taskArtifacts/cache.properties.lock
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/taskArtifacts/fileHashes.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/fileSnapshots.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/taskArtifacts/fileSnapshots.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/outputFileStates.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/taskArtifacts/outputFileStates.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/taskArtifacts/taskArtifacts.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/taskArtifacts/taskArtifacts.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin
--------------------------------------------------------------------------------
/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock
--------------------------------------------------------------------------------
/UploadTool/.idea/.name:
--------------------------------------------------------------------------------
1 | UploadTol
--------------------------------------------------------------------------------
/UploadTool/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/UploadTool/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/UploadTool/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/UploadTool/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
23 |
24 |
--------------------------------------------------------------------------------
/UploadTool/.idea/libraries/android_async_http_1_4_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UploadTool/.idea/libraries/commons_codec_1_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UploadTool/.idea/libraries/sun_misc_BASE64Decoder.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UploadTool/.idea/libraries/support_annotations_23_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/UploadTool/.idea/libraries/support_v4_23_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/UploadTool/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/UploadTool/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UploadTool/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UploadTool/UploadTool.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/UploadTool/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | generateDebugSources
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/UploadTool/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 17
5 | buildToolsVersion "23.0.3"
6 |
7 | defaultConfig {
8 | applicationId "com.ke.uploadtol"
9 | minSdkVersion 8
10 | targetSdkVersion 17
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile 'com.android.support:support-v4:23.3.0'
23 | compile files('libs/commons-codec-1.8.jar')
24 | compile files('libs/sun.misc.BASE64Decoder.jar')
25 | compile files('libs/android-async-http-1.4.8.jar')
26 | }
27 |
--------------------------------------------------------------------------------
/UploadTool/app/build/generated/source/buildConfig/androidTest/debug/com/ke/uploadtol/test/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package com.ke.uploadtol.test;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = Boolean.parseBoolean("true");
8 | public static final String APPLICATION_ID = "com.ke.uploadtol.test";
9 | public static final String BUILD_TYPE = "debug";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = -1;
12 | public static final String VERSION_NAME = "";
13 | }
14 |
--------------------------------------------------------------------------------
/UploadTool/app/build/generated/source/buildConfig/debug/com/ke/uploadtol/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Automatically generated file. DO NOT MODIFY
3 | */
4 | package com.ke.uploadtol;
5 |
6 | public final class BuildConfig {
7 | public static final boolean DEBUG = Boolean.parseBoolean("true");
8 | public static final String APPLICATION_ID = "com.ke.uploadtol";
9 | public static final String BUILD_TYPE = "debug";
10 | public static final String FLAVOR = "";
11 | public static final int VERSION_CODE = 1;
12 | public static final String VERSION_NAME = "1.0";
13 | }
14 |
--------------------------------------------------------------------------------
/UploadTool/app/build/generated/source/r/debug/com/ke/uploadtol/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package com.ke.uploadtol;
9 |
10 | public final class R {
11 | public static final class attr {
12 | }
13 | public static final class dimen {
14 | public static final int activity_horizontal_margin=0x7f040000;
15 | public static final int activity_vertical_margin=0x7f040001;
16 | }
17 | public static final class drawable {
18 | public static final int fileke=0x7f020000;
19 | public static final int folderke=0x7f020001;
20 | public static final int ic_launcher=0x7f020002;
21 | public static final int icon=0x7f020003;
22 | }
23 | public static final class id {
24 | public static final int action_settings=0x7f08000a;
25 | public static final int btn_parent=0x7f080006;
26 | public static final int choseAllFiles=0x7f080001;
27 | public static final int choseFile=0x7f080000;
28 | public static final int file_list=0x7f080005;
29 | public static final int file_name=0x7f080008;
30 | public static final int file_path=0x7f080004;
31 | public static final int groupItem=0x7f080009;
32 | public static final int icon=0x7f080007;
33 | public static final int startUpload=0x7f080003;
34 | public static final int tvData=0x7f080002;
35 | }
36 | public static final class layout {
37 | public static final int activity_main=0x7f030000;
38 | public static final int chose_all_files=0x7f030001;
39 | public static final int chose_file=0x7f030002;
40 | public static final int line=0x7f030003;
41 | public static final int popup=0x7f030004;
42 | }
43 | public static final class menu {
44 | public static final int main=0x7f070000;
45 | }
46 | public static final class string {
47 | public static final int action_settings=0x7f060000;
48 | public static final int app_name=0x7f060001;
49 | public static final int btn_parent=0x7f060002;
50 | public static final int choseAllFiles=0x7f060003;
51 | public static final int choseFile=0x7f060004;
52 | public static final int chose_all_file=0x7f060005;
53 | public static final int chose_file=0x7f060006;
54 | public static final int startUpload=0x7f060007;
55 | public static final int tvData=0x7f060008;
56 | }
57 | public static final class style {
58 | /** API 11 theme customizations can go here.
59 | API 14 theme customizations can go here.
60 |
61 | Theme customizations available in newer API levels can go in
62 | res/values-vXX/styles.xml, while customizations related to
63 | backward-compatibility can go here.
64 |
65 | */
66 | public static final int AppBaseTheme=0x7f050000;
67 | /** All customizations that are NOT specific to a particular API-level can go here.
68 | */
69 | public static final int AppTheme=0x7f050001;
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/multi/values-sw720dp-land-v13.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "outputFile": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\values-sw720dp-land-v13\\values-sw720dp-land-v13.xml",
4 | "map": [
5 | {
6 | "to": {
7 | "startLine": 2,
8 | "startColumn": 4,
9 | "startOffset": 55,
10 | "endColumn": 58,
11 | "endOffset": 109
12 | },
13 | "from": {
14 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values-sw720dp-land\\dimens.xml",
15 | "position": {
16 | "startLine": 6,
17 | "startColumn": 4,
18 | "startOffset": 205,
19 | "endColumn": 58,
20 | "endOffset": 259
21 | }
22 | }
23 | }
24 | ]
25 | }
26 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/multi/values-v11.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "outputFile": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\values-v11\\values-v11.xml",
4 | "map": [
5 | {
6 | "to": {
7 | "startLine": 2,
8 | "startColumn": 4,
9 | "startOffset": 55,
10 | "endLine": 4,
11 | "endColumn": 12,
12 | "endOffset": 187
13 | },
14 | "from": {
15 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values-v11\\styles.xml",
16 | "position": {
17 | "startLine": 6,
18 | "startColumn": 4,
19 | "startOffset": 182,
20 | "endLine": 8,
21 | "endColumn": 12,
22 | "endOffset": 316
23 | }
24 | }
25 | }
26 | ]
27 | }
28 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/multi/values-v14.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "outputFile": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\values-v14\\values-v14.xml",
4 | "map": [
5 | {
6 | "to": {
7 | "startLine": 2,
8 | "startColumn": 4,
9 | "startOffset": 55,
10 | "endLine": 4,
11 | "endColumn": 12,
12 | "endOffset": 201
13 | },
14 | "from": {
15 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values-v14\\styles.xml",
16 | "position": {
17 | "startLine": 7,
18 | "startColumn": 4,
19 | "startOffset": 225,
20 | "endLine": 9,
21 | "endColumn": 12,
22 | "endOffset": 373
23 | }
24 | }
25 | }
26 | ]
27 | }
28 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/multi/values.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "outputFile": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\values\\values.xml",
4 | "map": [
5 | {
6 | "to": {
7 | "startLine": 2,
8 | "startColumn": 4,
9 | "startOffset": 55,
10 | "endColumn": 57,
11 | "endOffset": 108
12 | },
13 | "from": {
14 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\dimens.xml",
15 | "position": {
16 | "startLine": 3,
17 | "startColumn": 4,
18 | "startOffset": 92,
19 | "endColumn": 57,
20 | "endOffset": 145
21 | }
22 | }
23 | },
24 | {
25 | "to": {
26 | "startLine": 3,
27 | "startColumn": 4,
28 | "startOffset": 113,
29 | "endColumn": 55,
30 | "endOffset": 164
31 | },
32 | "from": {
33 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\dimens.xml",
34 | "position": {
35 | "startLine": 4,
36 | "startColumn": 4,
37 | "startOffset": 151,
38 | "endColumn": 55,
39 | "endOffset": 202
40 | }
41 | }
42 | },
43 | {
44 | "to": {
45 | "startLine": 4,
46 | "startColumn": 4,
47 | "startOffset": 169,
48 | "endColumn": 52,
49 | "endOffset": 217
50 | },
51 | "from": {
52 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
53 | "position": {
54 | "startLine": 7,
55 | "startColumn": 4,
56 | "startOffset": 204,
57 | "endColumn": 52,
58 | "endOffset": 252
59 | }
60 | }
61 | },
62 | {
63 | "to": {
64 | "startLine": 5,
65 | "startColumn": 4,
66 | "startOffset": 222,
67 | "endColumn": 46,
68 | "endOffset": 264
69 | },
70 | "from": {
71 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
72 | "position": {
73 | "startLine": 3,
74 | "startColumn": 4,
75 | "startOffset": 58,
76 | "endColumn": 46,
77 | "endOffset": 100
78 | }
79 | }
80 | },
81 | {
82 | "to": {
83 | "startLine": 6,
84 | "startColumn": 4,
85 | "startOffset": 269,
86 | "endColumn": 44,
87 | "endOffset": 309
88 | },
89 | "from": {
90 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
91 | "position": {
92 | "startLine": 15,
93 | "startColumn": 4,
94 | "startOffset": 453,
95 | "endColumn": 44,
96 | "endOffset": 493
97 | }
98 | }
99 | },
100 | {
101 | "to": {
102 | "startLine": 7,
103 | "startColumn": 4,
104 | "startOffset": 314,
105 | "endColumn": 47,
106 | "endOffset": 357
107 | },
108 | "from": {
109 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
110 | "position": {
111 | "startLine": 9,
112 | "startColumn": 4,
113 | "startOffset": 301,
114 | "endColumn": 47,
115 | "endOffset": 344
116 | }
117 | }
118 | },
119 | {
120 | "to": {
121 | "startLine": 8,
122 | "startColumn": 4,
123 | "startOffset": 362,
124 | "endColumn": 42,
125 | "endOffset": 400
126 | },
127 | "from": {
128 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
129 | "position": {
130 | "startLine": 8,
131 | "startColumn": 4,
132 | "startOffset": 258,
133 | "endColumn": 42,
134 | "endOffset": 296
135 | }
136 | }
137 | },
138 | {
139 | "to": {
140 | "startLine": 9,
141 | "startColumn": 4,
142 | "startOffset": 405,
143 | "endColumn": 48,
144 | "endOffset": 449
145 | },
146 | "from": {
147 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
148 | "position": {
149 | "startLine": 5,
150 | "startColumn": 4,
151 | "startOffset": 149,
152 | "endColumn": 48,
153 | "endOffset": 193
154 | }
155 | }
156 | },
157 | {
158 | "to": {
159 | "startLine": 10,
160 | "startColumn": 4,
161 | "startOffset": 454,
162 | "endColumn": 43,
163 | "endOffset": 493
164 | },
165 | "from": {
166 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
167 | "position": {
168 | "startLine": 4,
169 | "startColumn": 4,
170 | "startOffset": 105,
171 | "endColumn": 43,
172 | "endOffset": 144
173 | }
174 | }
175 | },
176 | {
177 | "to": {
178 | "startLine": 11,
179 | "startColumn": 4,
180 | "startOffset": 498,
181 | "endColumn": 44,
182 | "endOffset": 538
183 | },
184 | "from": {
185 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
186 | "position": {
187 | "startLine": 10,
188 | "startColumn": 4,
189 | "startOffset": 349,
190 | "endColumn": 44,
191 | "endOffset": 389
192 | }
193 | }
194 | },
195 | {
196 | "to": {
197 | "startLine": 12,
198 | "startColumn": 4,
199 | "startOffset": 543,
200 | "endColumn": 43,
201 | "endOffset": 582
202 | },
203 | "from": {
204 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\strings.xml",
205 | "position": {
206 | "startLine": 12,
207 | "startColumn": 4,
208 | "startOffset": 399,
209 | "endColumn": 43,
210 | "endOffset": 438
211 | }
212 | }
213 | },
214 | {
215 | "to": {
216 | "startLine": 13,
217 | "startColumn": 4,
218 | "startOffset": 587,
219 | "endLine": 19,
220 | "endColumn": 12,
221 | "endOffset": 873
222 | },
223 | "from": {
224 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\styles.xml",
225 | "position": {
226 | "startLine": 6,
227 | "startColumn": 4,
228 | "startOffset": 191,
229 | "endLine": 12,
230 | "endColumn": 12,
231 | "endOffset": 481
232 | }
233 | }
234 | },
235 | {
236 | "to": {
237 | "startLine": 20,
238 | "startColumn": 4,
239 | "startOffset": 878,
240 | "endLine": 22,
241 | "endColumn": 12,
242 | "endOffset": 1033
243 | },
244 | "from": {
245 | "file": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\values\\styles.xml",
246 | "position": {
247 | "startLine": 15,
248 | "startColumn": 4,
249 | "startOffset": 522,
250 | "endLine": 17,
251 | "endColumn": 12,
252 | "endOffset": 679
253 | }
254 | }
255 | }
256 | ]
257 | }
258 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/drawable-hdpi-v4.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-hdpi-v4\\fileke.png",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-hdpi\\fileke.png"
5 | },
6 | {
7 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-hdpi-v4\\ic_launcher.png",
8 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-hdpi\\ic_launcher.png"
9 | },
10 | {
11 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-hdpi-v4\\icon.png",
12 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-hdpi\\icon.png"
13 | },
14 | {
15 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-hdpi-v4\\folderke.png",
16 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-hdpi\\folderke.png"
17 | }
18 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/drawable-mdpi-v4.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-mdpi-v4\\ic_launcher.png",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-mdpi\\ic_launcher.png"
5 | }
6 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/drawable-xhdpi-v4.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-xhdpi-v4\\ic_launcher.png",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-xhdpi\\ic_launcher.png"
5 | }
6 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/drawable-xxhdpi-v4.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\drawable-xxhdpi-v4\\ic_launcher.png",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\drawable-xxhdpi\\ic_launcher.png"
5 | }
6 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/layout.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\layout\\line.xml",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\layout\\line.xml"
5 | },
6 | {
7 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\layout\\popup.xml",
8 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\layout\\popup.xml"
9 | },
10 | {
11 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\layout\\chose_all_files.xml",
12 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\layout\\chose_all_files.xml"
13 | },
14 | {
15 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\layout\\chose_file.xml",
16 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\layout\\chose_file.xml"
17 | },
18 | {
19 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\layout\\activity_main.xml",
20 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\layout\\activity_main.xml"
21 | }
22 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/blame/res/debug/single/menu.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "merged": "E:\\AndroidStudioProjects\\UploadTool\\app\\build\\intermediates\\res\\merged\\debug\\menu\\main.xml",
4 | "source": "E:\\AndroidStudioProjects\\UploadTool\\app\\src\\main\\res\\menu\\main.xml"
5 | }
6 | ]
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aapt/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/media/MediaMetadataCompat.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright 2014, The Android Open Source Project
2 | **
3 | ** Licensed under the Apache License, Version 2.0 (the "License");
4 | ** you may not use this file except in compliance with the License.
5 | ** You may obtain a copy of the License at
6 | **
7 | ** http://www.apache.org/licenses/LICENSE-2.0
8 | **
9 | ** Unless required by applicable law or agreed to in writing, software
10 | ** distributed under the License is distributed on an "AS IS" BASIS,
11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ** See the License for the specific language governing permissions and
13 | ** limitations under the License.
14 | */
15 |
16 | package android.support.v4.media;
17 |
18 | parcelable MediaMetadataCompat;
19 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/media/RatingCompat.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright 2014, The Android Open Source Project
2 | **
3 | ** Licensed under the Apache License, Version 2.0 (the "License");
4 | ** you may not use this file except in compliance with the License.
5 | ** You may obtain a copy of the License at
6 | **
7 | ** http://www.apache.org/licenses/LICENSE-2.0
8 | **
9 | ** Unless required by applicable law or agreed to in writing, software
10 | ** distributed under the License is distributed on an "AS IS" BASIS,
11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ** See the License for the specific language governing permissions and
13 | ** limitations under the License.
14 | */
15 |
16 | package android.support.v4.media;
17 |
18 | parcelable RatingCompat;
19 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/media/session/MediaSessionCompat.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright 2014, The Android Open Source Project
2 | **
3 | ** Licensed under the Apache License, Version 2.0 (the "License");
4 | ** you may not use this file except in compliance with the License.
5 | ** You may obtain a copy of the License at
6 | **
7 | ** http://www.apache.org/licenses/LICENSE-2.0
8 | **
9 | ** Unless required by applicable law or agreed to in writing, software
10 | ** distributed under the License is distributed on an "AS IS" BASIS,
11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ** See the License for the specific language governing permissions and
13 | ** limitations under the License.
14 | */
15 |
16 | package android.support.v4.media.session;
17 |
18 | parcelable MediaSessionCompat.Token;
19 | parcelable MediaSessionCompat.QueueItem;
20 | parcelable MediaSessionCompat.ResultReceiverWrapper;
21 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/media/session/ParcelableVolumeInfo.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright 2014, The Android Open Source Project
2 | **
3 | ** Licensed under the Apache License, Version 2.0 (the "License");
4 | ** you may not use this file except in compliance with the License.
5 | ** You may obtain a copy of the License at
6 | **
7 | ** http://www.apache.org/licenses/LICENSE-2.0
8 | **
9 | ** Unless required by applicable law or agreed to in writing, software
10 | ** distributed under the License is distributed on an "AS IS" BASIS,
11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ** See the License for the specific language governing permissions and
13 | ** limitations under the License.
14 | */
15 |
16 | package android.support.v4.media.session;
17 |
18 | parcelable ParcelableVolumeInfo;
19 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/media/session/PlaybackStateCompat.aidl:
--------------------------------------------------------------------------------
1 | /* Copyright 2014, The Android Open Source Project
2 | **
3 | ** Licensed under the Apache License, Version 2.0 (the "License");
4 | ** you may not use this file except in compliance with the License.
5 | ** You may obtain a copy of the License at
6 | **
7 | ** http://www.apache.org/licenses/LICENSE-2.0
8 | **
9 | ** Unless required by applicable law or agreed to in writing, software
10 | ** distributed under the License is distributed on an "AS IS" BASIS,
11 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ** See the License for the specific language governing permissions and
13 | ** limitations under the License.
14 | */
15 |
16 | package android.support.v4.media.session;
17 |
18 | parcelable PlaybackStateCompat;
19 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/aidl/android/support/v4/os/ResultReceiver.aidl:
--------------------------------------------------------------------------------
1 | /*
2 | ** Copyright 2015, The Android Open Source Project
3 | **
4 | ** Licensed under the Apache License, Version 2.0 (the "License");
5 | ** you may not use this file except in compliance with the License.
6 | ** You may obtain a copy of the License at
7 | **
8 | ** http://www.apache.org/licenses/LICENSE-2.0
9 | **
10 | ** Unless required by applicable law or agreed to in writing, software
11 | ** distributed under the License is distributed on an "AS IS" BASIS,
12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | ** See the License for the specific language governing permissions and
14 | ** limitations under the License.
15 | */
16 |
17 | package android.support.v4.os;
18 |
19 | parcelable ResultReceiver;
20 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/annotations.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/annotations.zip
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/jars/classes.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/jars/classes.jar
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/jars/libs/internal_impl-23.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/jars/libs/internal_impl-23.3.0.jar
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/compileDebugAidl/dependency.store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/compileDebugAndroidTestAidl/dependency.store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugAndroidTestAssets/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugAndroidTestResources/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugAndroidTestShaders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugAssets/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugResources/merger.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp16dp选择文件FileName选择文件SettingsUploadTol上一级目录选择文件夹开始上传选择文件夹128dp
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/incremental/mergeDebugShaders/merger.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/fileke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/fileke.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/folderke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/folderke.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-hdpi-v4/icon.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-mdpi-v4/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-mdpi-v4/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-xhdpi-v4/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-xhdpi-v4/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/drawable-xxhdpi-v4/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/merged/debug/drawable-xxhdpi-v4/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
20 |
21 |
25 |
34 |
35 |
36 |
37 |
42 |
43 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/layout/chose_all_files.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
24 |
25 |
26 |
34 |
35 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/layout/chose_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
24 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/layout/line.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/layout/popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/values-sw720dp-land-v13/values-sw720dp-land-v13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 128dp
4 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/values-v11/values-v11.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/values-v14/values-v14.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/merged/debug/values/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | Settings
6 | UploadTol
7 | 上一级目录
8 | 选择文件夹
9 | 选择文件
10 | 选择文件夹
11 | 选择文件
12 | 开始上传
13 | FileName
14 |
21 |
24 |
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/resources-debug-androidTest.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/resources-debug-androidTest.ap_
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/res/resources-debug.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/build/intermediates/res/resources-debug.ap_
--------------------------------------------------------------------------------
/UploadTool/app/build/intermediates/symbols/debug/R.txt:
--------------------------------------------------------------------------------
1 | int dimen activity_horizontal_margin 0x7f040000
2 | int dimen activity_vertical_margin 0x7f040001
3 | int drawable fileke 0x7f020000
4 | int drawable folderke 0x7f020001
5 | int drawable ic_launcher 0x7f020002
6 | int drawable icon 0x7f020003
7 | int id action_settings 0x7f08000a
8 | int id btn_parent 0x7f080006
9 | int id choseAllFiles 0x7f080001
10 | int id choseFile 0x7f080000
11 | int id file_list 0x7f080005
12 | int id file_name 0x7f080008
13 | int id file_path 0x7f080004
14 | int id groupItem 0x7f080009
15 | int id icon 0x7f080007
16 | int id startUpload 0x7f080003
17 | int id tvData 0x7f080002
18 | int layout activity_main 0x7f030000
19 | int layout chose_all_files 0x7f030001
20 | int layout chose_file 0x7f030002
21 | int layout line 0x7f030003
22 | int layout popup 0x7f030004
23 | int menu main 0x7f070000
24 | int string action_settings 0x7f060000
25 | int string app_name 0x7f060001
26 | int string btn_parent 0x7f060002
27 | int string choseAllFiles 0x7f060003
28 | int string choseFile 0x7f060004
29 | int string chose_all_file 0x7f060005
30 | int string chose_file 0x7f060006
31 | int string startUpload 0x7f060007
32 | int string tvData 0x7f060008
33 | int style AppBaseTheme 0x7f050000
34 | int style AppTheme 0x7f050001
35 |
--------------------------------------------------------------------------------
/UploadTool/app/build/outputs/logs/manifest-merger-debug-report.txt:
--------------------------------------------------------------------------------
1 | -- Merging decision tree log ---
2 | manifest
3 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:2:1-41:12
4 | package
5 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:3:5-31
6 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
7 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
8 | android:versionName
9 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:5:5-30
10 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
11 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
12 | android:versionCode
13 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:4:5-28
14 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
15 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
16 | xmlns:android
17 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:2:11-69
18 | uses-sdk
19 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:7:5-9:41
20 | MERGED from [com.android.support:support-v4:23.3.0] E:\AndroidStudioProjects\UploadTool\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.3.0\AndroidManifest.xml:20:5-43
21 | android:targetSdkVersion
22 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:9:9-38
23 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
24 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
25 | android:minSdkVersion
26 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:8:9-34
27 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
28 | INJECTED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml
29 | application
30 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:11:5-35:19
31 | MERGED from [com.android.support:support-v4:23.3.0] E:\AndroidStudioProjects\UploadTool\app\build\intermediates\exploded-aar\com.android.support\support-v4\23.3.0\AndroidManifest.xml:22:5-20
32 | android:label
33 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:14:9-41
34 | android:allowBackup
35 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:12:9-35
36 | android:icon
37 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:13:9-45
38 | android:theme
39 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:15:9-40
40 | activity#com.ke.uploadtol.activity.MainActivity
41 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:16:9-24:20
42 | android:label
43 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:18:13-45
44 | android:name
45 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:17:13-50
46 | intent-filter#android.intent.action.MAIN+android.intent.category.LAUNCHER
47 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:19:13-23:29
48 | action#android.intent.action.MAIN
49 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:20:17-69
50 | android:name
51 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:20:25-66
52 | category#android.intent.category.LAUNCHER
53 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:22:17-77
54 | android:name
55 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:22:27-74
56 | activity#com.ke.uploadtol.activity.ChoseFileToolActivity
57 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:26:9-29:20
58 | android:label
59 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:28:13-47
60 | android:name
61 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:27:13-59
62 | activity#com.ke.uploadtol.activity.ChoseFolderToolActivity
63 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:31:9-34:20
64 | android:label
65 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:33:13-51
66 | android:name
67 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:32:13-61
68 | uses-permission#android.permission.INTERNET
69 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:37:5-67
70 | android:name
71 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:37:22-64
72 | uses-permission#android.permission.WRITE_EXTERNAL_STORAGE
73 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:38:5-80
74 | android:name
75 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:38:22-78
76 | uses-permission#android.permission.MOUNT_UNMOUNT_FILESYSTEMS
77 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:39:5-83
78 | android:name
79 | ADDED from E:\AndroidStudioProjects\UploadTool\app\src\main\AndroidManifest.xml:39:22-81
80 |
--------------------------------------------------------------------------------
/UploadTool/app/libs/android-async-http-1.4.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/libs/android-async-http-1.4.8.jar
--------------------------------------------------------------------------------
/UploadTool/app/libs/commons-codec-1.8.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/libs/commons-codec-1.8.jar
--------------------------------------------------------------------------------
/UploadTool/app/libs/sun.misc.BASE64Decoder.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/libs/sun.misc.BASE64Decoder.jar
--------------------------------------------------------------------------------
/UploadTool/app/src.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src.zip
--------------------------------------------------------------------------------
/UploadTool/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/activity/ChoseFileToolActivity.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.activity;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.util.ArrayList;
6 | import java.util.HashMap;
7 | import java.util.List;
8 | import java.util.Map;
9 |
10 | import android.annotation.SuppressLint;
11 | import android.app.Activity;
12 | import android.content.Intent;
13 | import android.os.Bundle;
14 | import android.util.Log;
15 | import android.view.View;
16 | import android.view.View.OnClickListener;
17 | import android.widget.AdapterView;
18 | import android.widget.AdapterView.OnItemClickListener;
19 | import android.widget.Button;
20 | import android.widget.ListView;
21 | import android.widget.SimpleAdapter;
22 | import android.widget.TextView;
23 | import android.widget.Toast;
24 |
25 | import com.ke.uploadtol.R;
26 |
27 | public class ChoseFileToolActivity extends Activity {
28 | private final static String TAG = "UPLOADTOL:ChoseFileToolActivity";
29 | public final static int resultCode = 0x11;
30 |
31 | ListView listView ;
32 | TextView textView ;
33 | Button btnParent;
34 | //记录当前的父类文件夹
35 | File currentParent;
36 | //记录当前路径下所有文件的文件数组
37 | File[] currentFiles;
38 |
39 | @SuppressLint("ShowToast")
40 | @Override
41 | protected void onCreate(Bundle savedInstanceState) {
42 | // TODO Auto-generated method stub
43 | super.onCreate(savedInstanceState);
44 | setContentView(R.layout.chose_file);
45 |
46 | //获取列表全部文件的ListView
47 | listView = (ListView) findViewById(R.id.file_list);
48 | textView = (TextView) findViewById(R.id.file_path);
49 | btnParent = (Button) findViewById(R.id.btn_parent);
50 | //获取系统的SD卡目录
51 | final File root = new File("/mnt/sdcard/");
52 | //如果SD卡存在
53 | if(root.exists()){
54 | currentParent = root ;
55 | currentFiles = root.listFiles();
56 | //使用当前目录下的全部文件,文件夹填充ListView
57 | inflateListView(currentFiles);
58 | //为listView的列表项的单击事件绑定监听器
59 | listView.setOnItemClickListener(new OnItemClickListener() {
60 |
61 | @Override
62 | public void onItemClick(AdapterView> parent, View view,
63 | int postion, long id) {
64 | //单击文件,返回文件路径
65 | if( currentFiles[postion].isFile() ){
66 | //TODO
67 | String path = currentFiles[postion].getPath();
68 | Log.i(TAG, "当前的file path : " + path);
69 | Intent intent = new Intent();
70 | Bundle bundle = new Bundle();
71 | bundle.putString("testStr", "第一个activity的内容");
72 | bundle.putString("current_path",path);
73 | intent.putExtras(bundle);
74 | setResult( resultCode, intent );
75 | finish();
76 | } else {
77 | //获取点击文件夹下面的所有的文件
78 | File[] tep = currentFiles[postion].listFiles();
79 | if( tep == null || tep.length == 0){
80 | Log.e(TAG, "当前文件夹下没有文件!");
81 | Toast.makeText(ChoseFileToolActivity.this, "该文件夹下没有文件", Toast.LENGTH_SHORT).show();
82 | } else {
83 | //获取单击的列表的列表项对应的文件夹,设为当前的父类文件夹
84 | currentParent = currentFiles[postion];
85 | //保存当前的父文件夹内全部的文件和文件夹
86 | currentFiles = tep;
87 | //再次更新ListView
88 | inflateListView(currentFiles);
89 | }
90 | }
91 | }
92 | });
93 | //获取上一级目录的按键
94 | btnParent.setOnClickListener(new OnClickListener() {
95 |
96 | @Override
97 | public void onClick(View arg0) {
98 | // TODO Auto-generated method stub
99 | try{
100 | if ( !currentParent.getCanonicalPath().equals("/mnt/sdcard") ) {
101 | //获取上一层目录
102 | currentParent = currentParent.getParentFile();
103 | currentFiles = currentParent.listFiles();
104 | //再次更新listView
105 | inflateListView(currentFiles);
106 | }
107 | }catch(IOException e){
108 | e.printStackTrace();
109 | }
110 | }
111 | });
112 | }
113 | }
114 |
115 | private void inflateListView(File[] files){
116 | //创建一个List集合,List集合的元素是 Map
117 | List< Map > listItems = new ArrayList< Map >();
118 | for (int i=0 ; i listItem = new HashMap();
120 | if (files[i].isDirectory()) {
121 | //是文件夹
122 | listItem.put("icon", R.drawable.folderke);
123 | } else {
124 | //是文件
125 | listItem.put("icon", R.drawable.fileke);
126 | }
127 | listItem.put("fileName", files[i].getName());
128 | //添加到List 项
129 | listItems.add(listItem);
130 | }
131 | //创建一个 SimpleAdapter
132 | SimpleAdapter simpleAdapter = new SimpleAdapter(this, listItems, R.layout.line,
133 | new String[]{"icon", "fileName"},
134 | new int[]{R.id.icon, R.id.file_name} );
135 | //为listView设置 Adapter
136 | listView.setAdapter(simpleAdapter);
137 | try {
138 | textView.setText("当前路径为: "+currentParent.getCanonicalPath());
139 | }catch (IOException e){
140 | e.printStackTrace();
141 | }
142 | }
143 |
144 |
145 |
146 | }
147 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/activity/ChoseFolderToolActivity.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.activity;
2 |
3 | import java.io.File;
4 | import java.util.ArrayList;
5 | import java.util.HashMap;
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | import android.annotation.SuppressLint;
10 | import android.app.Activity;
11 | import android.app.AlertDialog;
12 | import android.content.DialogInterface;
13 | import android.content.Intent;
14 | import android.os.Bundle;
15 | import android.util.Log;
16 | import android.view.View;
17 | import android.view.View.OnClickListener;
18 | import android.widget.AdapterView;
19 | import android.widget.AdapterView.OnItemClickListener;
20 | import android.widget.Button;
21 | import android.widget.ListView;
22 | import android.widget.SimpleAdapter;
23 | import android.widget.TextView;
24 | import android.widget.Toast;
25 |
26 | import com.ke.uploadtol.R;
27 |
28 | public class ChoseFolderToolActivity extends Activity {
29 | private final static String TAG = "UPLOADTOL:ChoseAllFilesToolActivity";
30 | public final static int resultCode = 0x12;
31 | private final static String rootUrl = "/mnt/sdcard";
32 |
33 | ListView listView ;
34 | TextView textView ;
35 | Button btnParent;
36 | //记录当前的父类文件夹url
37 | String currentParent;
38 | //记录当前路径下所有文件的文件数组
39 | // File[] currentFiles;
40 |
41 | @SuppressLint("ShowToast")
42 | @Override
43 | protected void onCreate(Bundle savedInstanceState) {
44 | // TODO Auto-generated method stub
45 | super.onCreate(savedInstanceState);
46 | setContentView(R.layout.chose_all_files);
47 |
48 | //获取列表全部文件的ListView
49 | listView = (ListView) findViewById(R.id.file_list);
50 | textView = (TextView) findViewById(R.id.file_path);
51 | btnParent = (Button) findViewById(R.id.btn_parent);
52 | //获取系统的SD卡目录
53 | final File root = new File(rootUrl);
54 | if(root.exists()){
55 | //如果SD卡存在
56 | currentParent = rootUrl;
57 | inflateListView(rootUrl);
58 | } else {
59 | textView.setText("SD卡不存在");
60 | return ;
61 | }
62 | //为listView的列表项的单击事件绑定监听器
63 | listView.setOnItemClickListener(new OnItemClickListener() {
64 | @Override
65 | public void onItemClick(AdapterView> parent, View view,
66 | int postion, long id) {
67 | File[] currentFiles = (new File(currentParent)).listFiles();
68 | Log.d(TAG, "setOnItemClickListener_url : "+(new File(currentParent)).getPath() );
69 | //获取点击的是文件夹,获取文件夹下面的所有文件夹
70 | File[] tep = currentFiles[postion].listFiles();
71 | Log.d(TAG, "currentFiles[postion]_Url : "+currentFiles[postion].getPath() );
72 | if( tep == null || tep.length == 0){
73 | Log.e(TAG, "当前文件夹下没有文件!");
74 | Toast.makeText(ChoseFolderToolActivity.this, "该文件夹下没有 文件", Toast.LENGTH_SHORT).show();
75 | } else {
76 | boolean isFolder = haveFolder(tep);
77 | if(isFolder){
78 | //获取单击的列表的列表项对应的文件夹,设为当前的父类文件夹
79 | currentParent = currentFiles[postion].getPath();
80 | //TODO
81 | showPopup();
82 | } else {
83 | Log.e(TAG, "当前文件夹下没有文件夹!");
84 | Toast.makeText(ChoseFolderToolActivity.this, "该文件夹下没有 文件夹", Toast.LENGTH_SHORT).show();
85 | Intent intent = new Intent();
86 | Bundle bundle = new Bundle();
87 | bundle.putString("current_path", "【"+currentFiles[postion].getPath()+"】");
88 | intent.putExtras(bundle);
89 | setResult( resultCode, intent );
90 | finish();
91 | }
92 | }
93 | }
94 | });
95 |
96 | //获取上一级目录的按键
97 | btnParent.setOnClickListener(new OnClickListener() {
98 | @Override
99 | public void onClick(View arg0) {
100 | if ( !currentParent.equals("/mnt/sdcard") ) {
101 | //获取上一层目录
102 | currentParent = getParentUrl(currentParent);
103 | inflateListView(currentParent);
104 | }
105 | }
106 | });
107 | }
108 |
109 | private void inflateListView(String url){
110 | //创建一个List集合,List集合的元素是 Map
111 | File file_p = new File(url);
112 | if (! file_p.exists()) {
113 | return ;
114 | }
115 | File[] files = file_p.listFiles();
116 | List< Map > listItems = new ArrayList< Map >();
117 | for (int i=0 ; i listItem = new HashMap();
119 | if(files[i].isDirectory()){
120 | //是文件夹
121 | listItem.put("icon", R.drawable.folderke);
122 | listItem.put("fileName", files[i].getName());
123 | //添加到List 项
124 | listItems.add(listItem);
125 | }
126 | }
127 | //创建一个 SimpleAdapter
128 | SimpleAdapter simpleAdapter = new SimpleAdapter(this, listItems, R.layout.line,
129 | new String[]{"icon", "fileName"},
130 | new int[]{R.id.icon, R.id.file_name} );
131 | //为listView设置 Adapter
132 | listView.setAdapter(simpleAdapter);
133 | textView.setText("当前路径为: "+ url );
134 | }
135 |
136 | //判断是否存在文件夹
137 | private boolean haveFolder(File[] files){
138 | if(files == null || files.length == 0){
139 | return false;
140 | }
141 | for(File file : files){
142 | if(file.isDirectory()){
143 | return true;
144 | }
145 | }
146 | return false;
147 | }
148 |
149 | //获取上一层目录url
150 | private String getParentUrl(String pathUrl){
151 | if(null == pathUrl){
152 | return "";
153 | }
154 | String newUrl = pathUrl.substring(0, pathUrl.lastIndexOf("/"));
155 | return newUrl;
156 | }
157 |
158 | /**
159 | * 弹出选择的popup
160 | * @return
161 | * true :进入下一级
162 | * false :返回当前目录
163 | * boolean
164 | * ChoseFolderToolActivity.java
165 | */
166 | private void showPopup(){
167 | final String[] arrayChose = new String[] {"进入下一级目录", "返回当前文件夹"};
168 | AlertDialog builder = new AlertDialog.Builder(ChoseFolderToolActivity.this)
169 | .setTitle("选择对话框")//设置标题
170 | .setIcon(R.drawable.icon)//设置简单的列表项内容
171 | .setItems(arrayChose, new DialogInterface.OnClickListener() {
172 | @Override
173 | public void onClick(DialogInterface dialog, int witch) {
174 | if(arrayChose[witch].equals(arrayChose[0])){
175 | Log.d(TAG, "进入下一级目录");
176 | inflateListView(currentParent);
177 | }
178 | else if(arrayChose[witch].equals(arrayChose[1])){
179 | Log.d(TAG, "返回当前文件夹");
180 | Intent intent = new Intent();
181 | Bundle bundle = new Bundle();
182 | bundle.putString("current_path", "【"+currentParent+"】");
183 | intent.putExtras(bundle);
184 | setResult( resultCode, intent );
185 | finish();
186 | }
187 | }
188 | })
189 | .setNegativeButton("取消", new DialogInterface.OnClickListener() {
190 | @Override
191 | public void onClick(DialogInterface dialog, int witch) {
192 | // TODO Auto-generated method stub
193 | currentParent = getParentUrl(currentParent);
194 | inflateListView(currentParent);
195 | }
196 | } )
197 | .setCancelable(false)
198 | .create();
199 | builder.show();
200 | }
201 |
202 | }
203 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/activity/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.activity;
2 |
3 | import java.text.SimpleDateFormat;
4 | import java.util.ArrayList;
5 | import java.util.Date;
6 | import java.util.List;
7 | import java.util.Locale;
8 | import java.util.regex.Pattern;
9 |
10 | import android.app.Activity;
11 | import android.content.Context;
12 | import android.content.Intent;
13 | import android.graphics.Color;
14 | import android.graphics.drawable.BitmapDrawable;
15 | import android.os.Bundle;
16 | import android.os.Handler;
17 | import android.os.Message;
18 | import android.util.Base64;
19 | import android.util.Log;
20 | import android.view.LayoutInflater;
21 | import android.view.Menu;
22 | import android.view.View;
23 | import android.view.View.OnClickListener;
24 | import android.view.WindowManager;
25 | import android.widget.Button;
26 | import android.widget.PopupWindow;
27 | import android.widget.TextView;
28 | import android.widget.Toast;
29 |
30 | import com.ke.uploadtol.R;
31 | import com.ke.uploadtol.tool.FileAccessI;
32 | import com.ke.uploadtol.tool.HttpUtils;
33 | import com.loopj.android.http.AsyncHttpClient;
34 | import com.loopj.android.http.RequestParams;
35 | import org.json.JSONObject;
36 |
37 | public class MainActivity extends Activity {
38 | private final static String TAG = "UPLOADTOL:MainActivity";
39 |
40 | private Button btnChoseFile;
41 | private Button btnChoseAllFiles;
42 | private Button btnStartUpload;
43 | private TextView txtResult;
44 | private TextView textView;
45 | private View vie;
46 | private PopupWindow popupWindow;
47 |
48 | private final static int FILE_PATH = 0x01;
49 | private final static int FILES_ALL_PATH = 0x02;
50 | private final static int ADD_LOG = 0x03;
51 | private final static int DELETE_LOG = 0x04;
52 | private final static int SHOW_LOG = 0x05;
53 | private final static int NOT_SUPPORT_FOLDER = 0x06;
54 |
55 | private String uploadUrl = "http://guonan99138.xicp.net:10386/AppServer/UploadFileServlet";
56 |
57 | private final static int backCode = 0x11;
58 |
59 |
60 | Handler handler = new Handler(){
61 | @Override
62 | public void handleMessage(Message msg) {
63 | int what = msg.what;
64 | switch(what){
65 | case FILE_PATH:
66 | Log.d(TAG, "@handleMessage_FILE_PATH");
67 | String path = (String) msg.obj;
68 | txtResult.setText(path);
69 | break;
70 | case FILES_ALL_PATH:
71 | Log.v(TAG, "@handleMessage_FILES_ALL_PATH");
72 | String path2 = (String) msg.obj;
73 | txtResult.setText(path2);
74 | break;
75 | case ADD_LOG:
76 | Log.v(TAG, "@handleMessage_ADD_LOG");
77 | showPopup(vie);
78 | break;
79 | case DELETE_LOG:
80 | Log.v(TAG, "@handleMessage_DELETE_LOG");
81 | dissPopup();
82 | break;
83 | case SHOW_LOG:
84 | Log.v(TAG, "@handleMessage_SHOW_LOG");
85 | txtResult.setText("上传完成!");
86 | break;
87 | case NOT_SUPPORT_FOLDER:
88 | Log.v(TAG, "@handleMessage_NOT_SUPPORT_FOLDER");
89 | Toast.makeText(MainActivity.this, "抱歉,暂不支持【文件夹】上传", Toast.LENGTH_SHORT).show();
90 | break;
91 | }
92 | }
93 | };
94 |
95 | @Override
96 | protected void onCreate(Bundle savedInstanceState) {
97 | super.onCreate(savedInstanceState);
98 | setContentView(R.layout.activity_main);
99 |
100 | btnChoseFile = (Button) findViewById(R.id.choseFile);
101 | btnChoseAllFiles = (Button) findViewById(R.id.choseAllFiles);
102 | btnStartUpload = (Button) findViewById(R.id.startUpload);
103 | txtResult = (TextView) findViewById(R.id.tvData);
104 | textView = (TextView) findViewById(R.id.groupItem);
105 |
106 | LayoutInflater lay = LayoutInflater.from(this);
107 | vie = lay.inflate(R.layout.popup, null);
108 |
109 |
110 | OnClickListener btnListener = new OnClickListener() {
111 | @Override
112 | public void onClick(View v) {
113 | switch (v.getId()) {
114 | case R.id.choseFile:
115 | Intent intent = new Intent();
116 | intent.setClass(MainActivity.this, ChoseFileToolActivity.class);
117 | startActivityForResult(intent, backCode);
118 | break;
119 | case R.id.choseAllFiles:
120 | Intent intent_all = new Intent();
121 | intent_all.setClass(MainActivity.this, ChoseFolderToolActivity.class);
122 | startActivityForResult(intent_all, backCode);
123 | break;
124 | case R.id.startUpload:
125 | String pathUrl = txtResult.getText().toString();
126 | /*****************/
127 | if(Pattern.matches("【(\\S+)】", pathUrl)){
128 | /*not support folder*/
129 | //TODO
130 | Message msg0 = Message.obtain();
131 | msg0.what = NOT_SUPPORT_FOLDER;
132 | msg0.obj = pathUrl;
133 | handler.sendMessage(msg0);
134 | } else {
135 | /*****************/
136 | Message msg = Message.obtain();
137 | msg.what = ADD_LOG;
138 | msg.obj = pathUrl;
139 | handler.sendMessage(msg);
140 | try {
141 | Log.d(TAG, "before_retStr : "+ pathUrl);
142 | HttpUtils.cutFileUpload("video", getFilePath(pathUrl));
143 | } catch (Exception e) {
144 | // TODO Auto-generated catch block
145 | e.printStackTrace();
146 | }
147 | /*end upload*/
148 | //TODO
149 | Message msg2 = Message.obtain();
150 | msg2.what = DELETE_LOG;
151 | msg2.obj = pathUrl;
152 | handler.sendMessage(msg2);
153 | /*show success or fail*/
154 | //TODO
155 | Message msg3 = Message.obtain();
156 | msg3.what = SHOW_LOG;
157 | msg3.obj = pathUrl;
158 | handler.sendMessage(msg3);
159 | }
160 | break;
161 | default:
162 | break;
163 | }
164 | }
165 | };
166 |
167 | btnChoseFile.setOnClickListener(btnListener);
168 | btnChoseAllFiles.setOnClickListener(btnListener);
169 | btnStartUpload.setOnClickListener(btnListener);
170 | }
171 |
172 | @Override
173 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
174 | // super.onActivityResult(requestCode, resultCode, data);
175 | Log.d(TAG, "@onActivityResult");
176 | if(requestCode == backCode){
177 | if(resultCode == ChoseFileToolActivity.resultCode){
178 | Bundle bundle = data.getExtras();
179 | String str = bundle.getString("current_path");
180 | String testStr = bundle.getString("testStr");
181 | Log.d(TAG, "获取的 文件路径: "+str);
182 | Log.d(TAG, "testStr : "+testStr);
183 | txtResult.setText(str);
184 | if(str != null){
185 | btnStartUpload.setBackgroundColor(Color.rgb(96, 96, 96));
186 | }
187 | }
188 | else if(resultCode == ChoseFolderToolActivity.resultCode) {
189 | Bundle bundle = data.getExtras();
190 | String str = bundle.getString("current_path");
191 | String testStr = bundle.getString("testStr");
192 | Log.d(TAG, "获取的 文件夹路径: "+str);
193 | Log.d(TAG, "testStr : "+testStr);
194 | txtResult.setText(str);
195 | if(str != null){
196 | btnStartUpload.setBackgroundColor(Color.rgb(96, 96, 96));
197 | }
198 | }
199 | }
200 | }
201 |
202 | //弹出popup
203 | private void showPopup(View view){
204 | popupWindow=new PopupWindow(view,300, 350);
205 | // 使其聚集
206 | popupWindow.setFocusable(true);
207 | // 设置不允许在外点击消失
208 | popupWindow.setOutsideTouchable(false);
209 | // 这个是为了点击“返回Back”也能使其消失,并且并不会影响你的背景
210 | popupWindow.setBackgroundDrawable(new BitmapDrawable());
211 | WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
212 | // 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
213 | int xPos = windowManager.getDefaultDisplay().getWidth() / 2
214 | - popupWindow.getWidth() / 2;
215 | Log.i("coder", "xPos:" + xPos);
216 | popupWindow.showAsDropDown(view, xPos, 0);
217 | }
218 | //去掉 popup
219 | private void dissPopup(){
220 | if(popupWindow != null){
221 | popupWindow.dismiss();
222 | }
223 | }
224 | // 休眠时间
225 | private void sleep(long time){
226 | try {
227 | Thread.sleep(time);
228 | } catch (InterruptedException e) {
229 | // TODO Auto-generated catch block
230 | e.printStackTrace();
231 | }
232 | }
233 | //截取字符串
234 | private String getFilePath(String path){
235 | if(path == null){
236 | return new String();
237 | }
238 | String result = path.substring(4);
239 | Log.d(TAG, "result : "+ result);
240 | return result;
241 | }
242 | //获取保存文件的名字
243 | private String getFileName(String path){
244 | if(path == null){
245 | return new String("nothing");
246 | }
247 | String name = path.substring(path.lastIndexOf("/")+1);
248 | Log.d(TAG, "name : "+name);
249 | return name;
250 | }
251 |
252 | public void cutFileUpload(String fileType, String filePath) {
253 |
254 | Log.d("lzx","cutFileUpload");
255 | try {
256 | FileAccessI fileAccessI = new FileAccessI(filePath, 0);
257 | Long nStartPos = 0l;
258 | Long length = fileAccessI.getFileLength();
259 | int mBufferSize = 1024 * 1000; // 每次处理1024 * 100字节
260 | byte[] buffer = new byte[mBufferSize];
261 | FileAccessI.Detail detail;
262 | long nRead = 0l;
263 | String vedioFileName = generatePicName(); // 分配一个文件名
264 | long nStart = nStartPos;
265 | List fileList = new ArrayList();
266 | while (nStart < length) {
267 | detail = fileAccessI.getContent(nStart);
268 | nRead = detail.length;
269 | buffer = detail.b;
270 | JSONObject mInDataJson = new JSONObject();
271 | mInDataJson.put("a", "282");
272 | mInDataJson.put("FileName", vedioFileName);
273 | mInDataJson.put("start", nStart); // 服务端获取开始文章进行写文件
274 | mInDataJson.put("filetype", fileType);
275 | mInDataJson.put("VEDIO", encodeByte(buffer));
276 | nStart += nRead;
277 | nStartPos = nStart;
278 | final String url = "http://172.16.1.60:8080/AppServer/UploadFileServlet?json="+mInDataJson.toString();
279 | //UploadTool.upLoadFile(url, buffer, filePath);
280 | RequestParams params = new RequestParams();
281 | params.put("json",mInDataJson.toString());
282 | params.put("name", "woshishishi");//传输的字符数据
283 |
284 |
285 | AsyncHttpClient client = new AsyncHttpClient();
286 | /*client.post(url, params, new AsyncHttpResponseHandler() {
287 |
288 | @Override
289 | public void onSuccess(int i, Header[] headers, byte[] bytes) {
290 |
291 | }
292 |
293 | @Override
294 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {
295 |
296 | }
297 | });*/
298 | }
299 |
300 |
301 |
302 | } catch (Exception e) {
303 | }
304 | }
305 |
306 | public static String generatePicName() {
307 | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSS", Locale.CHINA);
308 | String filename = sdf.format(new Date(System.currentTimeMillis())) + ".mp4";
309 | return filename;
310 | }
311 | private static String encodeByte(byte[] buffer) {
312 | Log.d("lzx","encodeByte");
313 | return Base64.encodeToString(buffer, 0, buffer.length, Base64.DEFAULT);
314 | }
315 | }
316 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/tool/FileAccessI.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.tool;
2 |
3 | import java.io.IOException;
4 | import java.io.RandomAccessFile;
5 | import java.io.Serializable;
6 |
7 | public class FileAccessI implements Serializable {
8 |
9 | RandomAccessFile oSavedFile;
10 | long nPos;
11 |
12 | public FileAccessI() throws IOException {
13 | this("", 0);
14 | }
15 |
16 | public FileAccessI(String sName, long nPos) throws IOException {
17 | oSavedFile = new RandomAccessFile(sName, "rw");
18 | // this.nPos = nPos;
19 | oSavedFile.seek(nPos);
20 | }
21 |
22 | public synchronized int write(byte[] b, int nStart, int nLen) {
23 | int n = -1;
24 | try {
25 | oSavedFile.write(b, nStart, nLen);
26 | n = nLen;
27 | } catch (IOException e) {
28 | e.printStackTrace();
29 | }
30 | return n;
31 | }
32 |
33 | // ÿ�ζ�ȡ102400�ֽ�
34 | public synchronized Detail getContent(long nStart) {
35 | Detail detail = new Detail();
36 | detail.b = new byte[102400];
37 | try {
38 | oSavedFile.seek(nStart);
39 | detail.length = oSavedFile.read(detail.b);
40 | } catch (IOException e) {
41 | e.printStackTrace();
42 | }
43 | return detail;
44 | }
45 |
46 | public class Detail {
47 |
48 | public byte[] b;
49 | public int length;
50 | }
51 |
52 |
53 | public long getFileLength() {
54 | Long length = 0l;
55 | try {
56 | length = oSavedFile.length();
57 | } catch (IOException e) {
58 | // TODO Auto-generated catch block
59 | e.printStackTrace();
60 | }
61 | return length;
62 | }
63 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/tool/HttpUtils.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.tool;
2 |
3 | import android.util.Base64;
4 | import android.util.Log;
5 |
6 | import com.loopj.android.http.AsyncHttpClient;
7 | import com.loopj.android.http.AsyncHttpResponseHandler;
8 | import com.loopj.android.http.RequestParams;
9 |
10 | import java.io.ByteArrayOutputStream;
11 | import java.io.File;
12 | import java.io.IOException;
13 | import java.text.SimpleDateFormat;
14 | import java.util.Date;
15 | import java.util.Locale;
16 |
17 | import org.apache.http.Header;
18 | import org.json.JSONObject;
19 |
20 | import common.FileUtiles;
21 |
22 | public class HttpUtils {
23 | public static void cutFileUpload(String fileType, String filePath) {
24 | try {
25 | FileAccessI fileAccessI = new FileAccessI(filePath, 0);
26 | Long nStartPos = 0l;
27 | Long length = fileAccessI.getFileLength();
28 | int mBufferSize = 1024 * 100; // 每次处理1024 * 100字节
29 | byte[] buffer = new byte[mBufferSize];
30 | FileAccessI.Detail detail;
31 | long nRead = 0l;
32 | String vedioFileName = generatePicName(); // 分配一个文件名
33 | long nStart = nStartPos;
34 | while (nStart < length) {
35 | detail = fileAccessI.getContent(nStart);
36 | nRead = detail.length;
37 | buffer = detail.b;
38 | final JSONObject mInDataJson = new JSONObject();
39 | mInDataJson.put("FileName", vedioFileName);
40 | mInDataJson.put("start", nStart); // 服务端获取开始文章进行写文件
41 | mInDataJson.put("filetype", fileType);
42 | nStart += nRead;
43 | nStartPos = nStart;
44 | String url = "http://172.16.1.60:8080/AppServer/UploadFileServlet";
45 |
46 | RequestParams params = new RequestParams();
47 | params.put("json", mInDataJson.toString());
48 | params.put("video", encodeByte(buffer));
49 |
50 | AsyncHttpClient client = new AsyncHttpClient();
51 | client.post(url, params, new AsyncHttpResponseHandler() {
52 |
53 | @Override
54 | public void onSuccess(int i, Header[] headers, byte[] bytes) {
55 |
56 | }
57 |
58 | @Override
59 | public void onFailure(int i, Header[] headers, byte[] bytes, Throwable throwable) {
60 |
61 | }
62 | });
63 | }
64 | } catch (Exception e) {
65 | }
66 | }
67 |
68 | private final static byte[] encodePostFileu(String name, byte[] file) throws IOException {
69 | ByteArrayOutputStream out = new ByteArrayOutputStream();
70 | out.write(file);
71 | return out.toByteArray();
72 | }
73 |
74 | private static String encodeByte(byte[] buffer) {
75 | Log.d("lzx","encodeByte");
76 | return Base64.encodeToString(buffer, 0, buffer.length, Base64.DEFAULT);
77 | }
78 |
79 | public static String generatePicName() {
80 | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSS", Locale.CHINA);
81 | String filename = sdf.format(new Date(System.currentTimeMillis())) + ".mp4";
82 | return filename;
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/tool/OpenSharedPerferences.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.tool;
2 |
3 | import java.util.Map;
4 |
5 | import org.json.JSONObject;
6 |
7 | import android.content.Context;
8 | import android.content.SharedPreferences;
9 |
10 | public class OpenSharedPerferences {
11 | /**
12 | * д�뱾��
13 | * @param context
14 | * @param file_name
15 | * @param map
16 | */
17 | public static void write(Context context,String file_name,Map map){
18 | SharedPreferences sharedPreferences=context.getSharedPreferences(file_name, Context.MODE_PRIVATE);
19 | SharedPreferences.Editor editor=sharedPreferences.edit();
20 | for (String key:map.keySet()) {
21 | editor.putString(key, map.get(key).toString());
22 | }
23 | editor.commit();
24 | }
25 | /**
26 | *
27 | * @param context
28 | * @param file_name
29 | * @param key
30 | * @return
31 | */
32 |
33 | public static String read(Context context,String file_name,String key){
34 | String result="";
35 | SharedPreferences sharedPreferences=context.getSharedPreferences(file_name, Context.MODE_PRIVATE);
36 | result=sharedPreferences.getString(key, "");
37 | return result;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/com/ke/uploadtol/tool/UploadTool.java:
--------------------------------------------------------------------------------
1 | package com.ke.uploadtol.tool;
2 |
3 | import java.io.BufferedReader;
4 | import java.io.DataOutputStream;
5 | import java.io.FileInputStream;
6 | import java.io.IOException;
7 | import java.io.InputStream;
8 | import java.io.InputStreamReader;
9 | import java.io.OutputStream;
10 | import java.net.HttpURLConnection;
11 | import java.net.MalformedURLException;
12 | import java.net.ProtocolException;
13 | import java.net.URL;
14 |
15 | import android.util.Base64;
16 | import android.util.Log;
17 |
18 | public class UploadTool {
19 | private final static String TAG = "lzx";
20 | private static final int TIMEOUT = 10000;// 10秒
21 |
22 | /**
23 | * 上传文件
24 | * @return
25 | * String
26 | * UploadTool.java
27 | */
28 | public static String upLoadFile(String urlPath)
29 | throws Exception{
30 | Log.d(TAG, "@upLoadFile");
31 | String end ="\r\n";
32 | String twoHyphens = "--";
33 | String boundary = "******";
34 | URL url = new URL(urlPath);
35 | HttpURLConnection con = (HttpURLConnection) url.openConnection();
36 | con.setDoOutput(true);
37 | /*允许Input,Output。不使用Cache*/
38 | con.setDoInput(true);
39 | con.setDoOutput(true);
40 | con.setUseCaches(false);//不允许使用缓存
41 | // /*设置传送的method=POST*/
42 | con.setRequestMethod("POST");
43 | // con.setRequestProperty("Connection", "Keep-Alive");
44 | // con.setRequestProperty("Charset", "UTF-8");
45 | // con.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + boundary);
46 | // /*设置DataOutputStream*/
47 | DataOutputStream ds = new DataOutputStream(con.getOutputStream());
48 | ds.writeBytes(twoHyphens + boundary + end);
49 | //ds.writeBytes("Content-Disposition: form-data; " + "name=\"file1\";filename=\"" + newName + "\";" +"" + end);
50 | ds.writeBytes(end);
51 | // //取得文件的FileInputStream
52 | //FileInputStream fs = new FileInputStream(newName);
53 | //
54 | // //设置每次写入1024byte
55 | //// int byteSize = 1024*1024;
56 | //// byte[] buffer = new byte[];
57 | // int length = -1;
58 | // //将文件写入到缓冲区
59 | // while( (length = fs.read(buffer)) != -1){
60 | // //ds.write(buffer, 0 ,buffer.length);
61 | // }
62 | //Log.v(TAG, "11111111111");
63 | //ds.writeBytes(end);
64 | //ds.writeBytes(twoHyphens + boundary + twoHyphens + end);
65 | /*close stream*/
66 | //fs.close();
67 | //ds.flush();
68 |
69 | /*取得response的内容*/
70 | InputStream is = con.getInputStream();
71 | int ch;
72 | StringBuffer b = new StringBuffer();
73 | while( (ch=is.read()) != -1 ){
74 | b.append( (char)ch );
75 | }
76 | /*关闭DataOutputStream*/
77 | //ds.close();
78 | return b.toString();
79 | }
80 |
81 | private static String encodeByte(byte[] buffer) {
82 | Log.d("lzx","encodeByte");
83 | return Base64.encodeToString(buffer, 0, buffer.length, Base64.DEFAULT);
84 | }
85 |
86 | /**
87 | * 上传文件夹
88 | * @return
89 | * String
90 | * UploadTool.java
91 | * @throws Exception
92 | */
93 | public static String upLoadFolder(){
94 | Log.d(TAG, "@upLoadFolder");
95 | //TODO
96 | return null;
97 | }
98 | public static String sendPost(String json) throws Exception{
99 | URL url = new URL("http://10.10.114.98:8080/AppServer/UploadFileServlet");
100 | HttpURLConnection con = (HttpURLConnection) url.openConnection();
101 | con.setDoOutput(true);
102 | // con.setRequestProperty("Content-Type", "application/json");
103 | // con.setRequestProperty("Accept", "application/json");
104 | DataOutputStream ds = new DataOutputStream(con.getOutputStream());
105 | StringBuilder sb1 = new StringBuilder();
106 | ds.writeBytes(sb1.toString());
107 |
108 |
109 | con.setRequestMethod("POST");
110 | con.connect();
111 | byte[] outputBytes=json.getBytes("UTF-8");
112 | OutputStream os=con.getOutputStream();
113 | os.write(outputBytes);
114 | os.close();
115 | int status=con.getResponseCode();
116 | if(status!=200){
117 | throw new IOException("Post failed with error code "+ status);
118 | }
119 | BufferedReader br=new BufferedReader(new InputStreamReader(con.getInputStream()));
120 | StringBuilder sb=new StringBuilder();
121 | String line;
122 | while((line=br.readLine())!=null){
123 | sb.append(line+"\n");
124 | }
125 | br.close();
126 | return sb.toString();
127 | }
128 |
129 | }
130 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/FileUtiles.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common;
6 |
7 | import java.io.ByteArrayInputStream;
8 | import java.io.ByteArrayOutputStream;
9 | import java.io.File;
10 | import java.io.FileInputStream;
11 | import java.io.FileNotFoundException;
12 | import java.io.IOException;
13 | import java.util.HashMap;
14 | import java.util.Map;
15 |
16 | public class FileUtiles {
17 |
18 | private static final Map contentTypes = new HashMap();
19 |
20 | static {
21 | initContentTypes();
22 | }
23 |
24 | //请求的类型文件
25 | private static final void initContentTypes() {
26 | contentTypes.put("ez", "application/andrew-inset");
27 | contentTypes.put("hqx", "application/mac-binhex40");
28 | contentTypes.put("cpt", "application/mac-compactpro");
29 | contentTypes.put("doc", "application/msword");
30 | contentTypes.put("bin", "application/octet-stream");
31 | contentTypes.put("dms", "application/octet-stream");
32 | contentTypes.put("lha", "application/octet-stream");
33 | contentTypes.put("lzh", "application/octet-stream");
34 | contentTypes.put("exe", "application/octet-stream");
35 | contentTypes.put("class", "application/octet-stream");
36 | contentTypes.put("so", "application/octet-stream");
37 | contentTypes.put("dll", "application/octet-stream");
38 | contentTypes.put("oda", "application/oda");
39 | contentTypes.put("pdf", "application/pdf");
40 | contentTypes.put("ai", "application/postscript");
41 | contentTypes.put("eps", "application/postscript");
42 | contentTypes.put("ps", "application/postscript");
43 | contentTypes.put("smi", "application/smil");
44 | contentTypes.put("smil", "application/smil");
45 | contentTypes.put("csv", "application/csv");
46 | //contentTypes.put("csv", "application/x-www-form-urlencoded");
47 | contentTypes.put("mif", "application/vnd.mif");
48 | contentTypes.put("xls", "application/vnd.ms-excel");
49 | contentTypes.put("ppt", "application/vnd.ms-powerpoint");
50 | contentTypes.put("wbxml", "application/vnd.wap.wbxml");
51 | contentTypes.put("wmlc", "application/vnd.wap.wmlc");
52 | contentTypes.put("wmlsc", "application/vnd.wap.wmlscriptc");
53 | contentTypes.put("bcpio", "application/x-bcpio");
54 | contentTypes.put("vcd", "application/x-cdlink");
55 | contentTypes.put("pgn", "application/x-chess-pgn");
56 | contentTypes.put("cpio", "application/x-cpio");
57 | contentTypes.put("csh", "application/x-csh");
58 | contentTypes.put("dcr", "application/x-director");
59 | contentTypes.put("dir", "application/x-director");
60 | contentTypes.put("dxr", "application/x-director");
61 | contentTypes.put("dvi", "application/x-dvi");
62 | contentTypes.put("spl", "application/x-futuresplash");
63 | contentTypes.put("gtar", "application/x-gtar");
64 | contentTypes.put("hdf", "application/x-hdf");
65 | contentTypes.put("js", "application/x-javascript");
66 | contentTypes.put("skp", "application/x-koan");
67 | contentTypes.put("skd", "application/x-koan");
68 | contentTypes.put("skt", "application/x-koan");
69 | contentTypes.put("skm", "application/x-koan");
70 | contentTypes.put("latex", "application/x-latex");
71 | contentTypes.put("nc", "application/x-netcdf");
72 | contentTypes.put("cdf", "application/x-netcdf");
73 | contentTypes.put("sh", "application/x-sh");
74 | contentTypes.put("shar", "application/x-shar");
75 | contentTypes.put("swf", "application/x-shockwave-flash");
76 | contentTypes.put("sit", "application/x-stuffit");
77 | contentTypes.put("sv4cpio", "application/x-sv4cpio");
78 | contentTypes.put("sv4crc", "application/x-sv4crc");
79 | contentTypes.put("tar", "application/x-tar");
80 | contentTypes.put("tcl", "application/x-tcl");
81 | contentTypes.put("tex", "application/x-tex");
82 | contentTypes.put("texinfo", "application/x-texinfo");
83 | contentTypes.put("texi", "application/x-texinfo");
84 | contentTypes.put("t", "application/x-troff");
85 | contentTypes.put("tr", "application/x-troff");
86 | contentTypes.put("roff", "application/x-troff");
87 | contentTypes.put("man", "application/x-troff-man");
88 | contentTypes.put("me", "application/x-troff-me");
89 | contentTypes.put("ms", "application/x-troff-ms");
90 | contentTypes.put("ustar", "application/x-ustar");
91 | contentTypes.put("src", "application/x-wais-source");
92 | contentTypes.put("xhtml", "application/xhtml+xml");
93 | contentTypes.put("xht", "application/xhtml+xml");
94 | contentTypes.put("zip", "application/zip");
95 | contentTypes.put("au", "audio/basic");
96 | contentTypes.put("snd", "audio/basic");
97 | contentTypes.put("mid", "audio/midi");
98 | contentTypes.put("midi", "audio/midi");
99 | contentTypes.put("kar", "audio/midi");
100 | contentTypes.put("mpga", "audio/mpeg");
101 | contentTypes.put("mp2", "audio/mpeg");
102 | contentTypes.put("mp3", "audio/mpeg");
103 | contentTypes.put("aif", "audio/x-aiff");
104 | contentTypes.put("aiff", "audio/x-aiff");
105 | contentTypes.put("aifc", "audio/x-aiff");
106 | contentTypes.put("m3u", "audio/x-mpegurl");
107 | contentTypes.put("ram", "audio/x-pn-realaudio");
108 | contentTypes.put("rm", "audio/x-pn-realaudio");
109 | contentTypes.put("rpm", "audio/x-pn-realaudio-plugin");
110 | contentTypes.put("ra", "audio/x-realaudio");
111 | contentTypes.put("wav", "audio/x-wav");
112 | contentTypes.put("pdb", "chemical/x-pdb");
113 | contentTypes.put("xyz", "chemical/x-xyz");
114 | contentTypes.put("bmp", "image/bmp");
115 | contentTypes.put("gif", "image/gif");
116 | contentTypes.put("ief", "image/ief");
117 | contentTypes.put("jpeg", "image/jpeg");
118 | contentTypes.put("jpg", "image/jpeg");
119 | contentTypes.put("jpe", "image/jpeg");
120 | contentTypes.put("png", "image/png");
121 | contentTypes.put("tiff", "image/tiff");
122 | contentTypes.put("tif", "image/tiff");
123 | contentTypes.put("djvu", "image/vnd.djvu");
124 | contentTypes.put("djv", "image/vnd.djvu");
125 | contentTypes.put("wbmp", "image/vnd.wap.wbmp");
126 | contentTypes.put("ras", "image/x-cmu-raster");
127 | contentTypes.put("pnm", "image/x-portable-anymap");
128 | contentTypes.put("pbm", "image/x-portable-bitmap");
129 | contentTypes.put("pgm", "image/x-portable-graymap");
130 | contentTypes.put("ppm", "image/x-portable-pixmap");
131 | contentTypes.put("rgb", "image/x-rgb");
132 | contentTypes.put("xbm", "image/x-xbitmap");
133 | contentTypes.put("xpm", "image/x-xpixmap");
134 | contentTypes.put("xwd", "image/x-xwindowdump");
135 | contentTypes.put("igs", "model/iges");
136 | contentTypes.put("iges", "model/iges");
137 | contentTypes.put("msh", "model/mesh");
138 | contentTypes.put("mesh", "model/mesh");
139 | contentTypes.put("silo", "model/mesh");
140 | contentTypes.put("wrl", "model/vrml");
141 | contentTypes.put("vrml", "model/vrml");
142 | contentTypes.put("css", "text/css");
143 | contentTypes.put("html", "text/html");
144 | contentTypes.put("htm", "text/html");
145 | contentTypes.put("asc", "text/plain");
146 | contentTypes.put("txt", "text/plain");
147 | contentTypes.put("rtx", "text/richtext");
148 | contentTypes.put("rtf", "text/rtf");
149 | contentTypes.put("sgml", "text/sgml");
150 | contentTypes.put("sgm", "text/sgml");
151 | contentTypes.put("tsv", "text/tab-separated-values");
152 | contentTypes.put("wml", "text/vnd.wap.wml");
153 | contentTypes.put("wmls", "text/vnd.wap.wmlscript");
154 | contentTypes.put("etx", "text/x-setext");
155 | contentTypes.put("xsl", "text/xml");
156 | contentTypes.put("xml", "text/xml");
157 | contentTypes.put("mpeg", "video/mpeg");
158 | contentTypes.put("mpg", "video/mpeg");
159 | contentTypes.put("mpe", "video/mpeg");
160 | contentTypes.put("qt", "video/quicktime");
161 | contentTypes.put("mov", "video/quicktime");
162 | contentTypes.put("mxu", "video/vnd.mpegurl");
163 | contentTypes.put("avi", "video/x-msvideo");
164 | contentTypes.put("movie", "video/x-sgi-movie");
165 | contentTypes.put("ice", "x-conference/x-cooltalk");
166 | }
167 |
168 | public static final String getFileContentType(File file) {
169 | if (contentTypes.isEmpty()) {
170 | initContentTypes();
171 | }
172 | final String name = file.getName();
173 | int index = name.lastIndexOf(".");
174 | String subfix = "";
175 | if (index != -1) {
176 | subfix = name.substring(index + 1);
177 | }
178 | String type = contentTypes.get(subfix);
179 | return type == null ? "" : type;
180 | }
181 | //将文件读取,写入到流中
182 | public static final byte[] getBytes(File file) throws IOException {
183 | FileInputStream fis = new FileInputStream(file);
184 | ByteArrayOutputStream bos = new ByteArrayOutputStream();
185 | byte[] bytes = new byte[1024];
186 | int length = 0;
187 | while ((length = fis.read(bytes)) != -1) {
188 | bos.write(bytes, 0, length);
189 | }
190 | return bos.toByteArray();
191 | }
192 | }
193 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/StreamReader.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common;
6 |
7 | import java.io.ByteArrayInputStream;
8 | import java.io.ByteArrayOutputStream;
9 | import java.io.IOException;
10 | import java.io.InputStream;
11 |
12 | public class StreamReader {
13 | public final static String getStringFromStream(InputStream is,
14 | String encoding) throws IOException {
15 | byte[] bytes = getBytesFromStream(is);
16 | encoding = encoding == null ? "UTF-8" : encoding;
17 | return new String(bytes, encoding);
18 | }
19 |
20 | public final static byte[] getBytesFromStream(InputStream is)
21 | throws IOException {
22 | ByteArrayOutputStream out = new ByteArrayOutputStream();
23 | int length = 0;
24 | byte[] bytes = new byte[1024];
25 | while ((length = is.read(bytes)) != -1) {
26 | out.write(bytes, 0, length);
27 | }
28 | return out.toByteArray();
29 | }
30 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/net/HttpRequest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common.net;
6 |
7 | import java.io.ByteArrayOutputStream;
8 | import java.io.File;
9 | import java.io.IOException;
10 | import java.io.InputStream;
11 | import java.io.OutputStream;
12 | import java.net.HttpURLConnection;
13 | import java.net.MalformedURLException;
14 | import java.net.URL;
15 | import java.net.URLEncoder;
16 | import java.util.HashMap;
17 | import java.util.Iterator;
18 | import java.util.Map;
19 | import java.util.Map.Entry;
20 |
21 | import common.FileUtiles;
22 |
23 | import java.util.Set;
24 |
25 | public class HttpRequest {
26 |
27 | private URL url;
28 | private String surl;
29 | private final Map params;
30 | private final Map files;
31 | private Method method;
32 | private int timeout = 5000;
33 | private String encoding = "UTF-8";
34 | private static final String BOUNDARYA = "ench";//naosdnfoasndfio
35 |
36 | public HttpRequest(String url) {
37 | surl = url;
38 | this.params = new HashMap();
39 | this.files = new HashMap();
40 | }
41 |
42 | public void addParam(String name, String value) {
43 | this.params.put(name, value);
44 | }
45 |
46 | public void addFile(String name, File file) {
47 | this.files.put(name, file);
48 | }
49 |
50 | public void removeParam(String name) {
51 | params.remove(name);
52 | }
53 |
54 | public void removeFile(String name) {
55 | files.remove(name);
56 | }
57 |
58 | public void clearAll() {
59 | params.clear();
60 | files.clear();
61 | }
62 |
63 | public void clearParams() {
64 | params.clear();
65 | }
66 |
67 | public void clearFiles() {
68 | files.clear();
69 | }
70 |
71 | public void setMethod(Method method) {
72 | this.method = method;
73 | }
74 |
75 | public void setTimeout(int timeout) {
76 | this.timeout = timeout;
77 | }
78 |
79 | public void setEncoding(String encoding) {
80 | this.encoding = encoding;
81 | }
82 |
83 | /**
84 | * 将map的键值用 & 和 = 连接起来,用于简单post请求
85 | *
86 | * @param params
87 | * @return
88 | */
89 | private final static String joinParams(Map params) {
90 | StringBuilder sb = new StringBuilder();
91 | if (!params.isEmpty()) {
92 | Set> enties = params.entrySet();
93 | Iterator> its = enties.iterator();
94 | while (its.hasNext()) {
95 | Entry entry = its.next();
96 | sb.append(entry.getKey());
97 | sb.append("=");
98 | sb.append(entry.getValue());
99 | sb.append("&");
100 | }
101 | sb.deleteCharAt(sb.length() - 1);
102 | }
103 | return sb.toString();
104 | }
105 |
106 | /**
107 | * 将所有参数全部附加到surl,用于get请求
108 | */
109 | private void addParamsToURL() {
110 | String params = joinParams(this.params);
111 | if (params.length() > 0) {
112 | surl += "?" + params;
113 | }
114 | }
115 |
116 | public HttpResponse exeute() throws IOException {
117 | HttpResponse response = null;
118 | if (method == Method.GET) {
119 | response = executeGET();
120 | } else if (method == Method.POST) {
121 | response = executePOST();
122 | } else {
123 | throw new IllegalArgumentException("必须调用 setMethod 方法");
124 | }
125 |
126 | return response;
127 | }
128 |
129 | /**
130 | * 例:contentType=text/html;charset=utf-8
131 | * return utf-8
132 | *
133 | * @param contentType
134 | * @return
135 | */
136 | final static String getEncoding(String contentType) {
137 | String encoding = null;
138 | if (contentType.contains("charset=")) {
139 | int index = contentType.indexOf("charset=");
140 | encoding = contentType.substring(index + 8);
141 | }
142 | return encoding;
143 | }
144 |
145 | private HttpResponse executeGET() throws IOException {
146 | HttpResponse response = null;
147 | addParamsToURL();
148 | url = new URL(surl);
149 | HttpURLConnection conn = (HttpURLConnection) url.openConnection();
150 | conn.setConnectTimeout(timeout);
151 | String contentType = conn.getContentType();
152 | String encoding = getEncoding(contentType);
153 | int code = conn.getResponseCode();
154 | String status = conn.getResponseMessage();
155 | InputStream inputStream = conn.getInputStream();
156 | response = new HttpResponse(code, status, encoding, inputStream);
157 | return response;
158 | }
159 |
160 | private HttpResponse executePOST() throws IOException {
161 | HttpResponse response = null;
162 | url = new URL(surl);
163 | HttpURLConnection conn = (HttpURLConnection) url.openConnection();
164 | conn.setConnectTimeout(timeout);
165 | conn.setRequestProperty("Charset", "UTF-8");
166 | conn.setDoInput(true);
167 | conn.setDoOutput(true);
168 | OutputStream os = null;
169 | if (files.isEmpty()) {
170 | os = conn.getOutputStream();
171 | os.write(joinParams(params).getBytes(encoding));
172 | } else {
173 | conn.setRequestProperty("Content-Type",
174 | "multipart/form-data;boundary=" + BOUNDARYA);
175 | os = conn.getOutputStream();
176 | String encodedParams = encodePostBody(params);
177 | System.out.println(encodedParams);
178 | os.write(encodedParams.getBytes());
179 | for (String name : files.keySet()) {
180 | File file = files.get(name);
181 | os.write(encodePostFile(name, file));
182 | }
183 | os.write("--".getBytes());
184 | os.write(BOUNDARYA.getBytes());
185 | os.write("--".getBytes());
186 | }
187 | os.flush();
188 | os.close();
189 | response = new HttpResponse(conn);
190 | return response;
191 | }
192 |
193 | private final static String encodePostBody(Map params) {
194 | if (params == null)
195 | return "";
196 | StringBuilder sb = new StringBuilder();
197 | for (String key : params.keySet()) {
198 | sb.append("--" + BOUNDARYA).append("\r\n");
199 | sb.append("Content-Disposition: form-data; name=\"" + key
200 | + "\"\r\n\r\n" + params.get(key));
201 | sb.append("\r\n");
202 | }
203 | return sb.toString();
204 | }
205 |
206 | private final static byte[] encodePostFile(String name, File file)
207 | throws IOException {
208 | System.out.println("开始写文件:" + name + "," + file.getAbsolutePath());
209 | ByteArrayOutputStream out = new ByteArrayOutputStream();
210 | StringBuilder sb = new StringBuilder();
211 | sb.append("--" + BOUNDARYA + "\r\n");
212 | sb.append("Content-Disposition: form-data;name=\"" + name + "\";");
213 | sb.append(" filename=\"" + file.getName() + "\"\r\n");
214 | sb.append("Content-Type:").append(FileUtiles.getFileContentType(file));
215 | sb.append("\r\n\r\n");
216 | System.out.println(sb.toString());
217 | out.write(sb.toString().getBytes("UTF-8"));
218 | sb.setLength(0);
219 | out.write(FileUtiles.getBytes(file));
220 | out.write("\r\n".getBytes());
221 | return out.toByteArray();
222 | }
223 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/net/HttpResponse.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common.net;
6 |
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 | import java.net.HttpURLConnection;
10 |
11 | public class HttpResponse {
12 |
13 | private final int code;
14 | private final String status;
15 | private final InputStream inputStream;
16 | private final String encoding;
17 |
18 | public HttpResponse(HttpURLConnection conn) throws IOException {
19 | String contentType = conn.getContentType();
20 | String encoding = HttpRequest.getEncoding(contentType);
21 | int code = conn.getResponseCode();
22 | String status = conn.getResponseMessage();
23 | InputStream inputStream = conn.getInputStream();
24 | this.code = code;
25 | this.status = status;
26 | this.encoding = encoding;
27 | this.inputStream = inputStream;
28 | }
29 |
30 | public HttpResponse(int code, String status, String encoding,
31 | InputStream inputStream) {
32 | super();
33 | this.code = code;
34 | this.status = status;
35 | this.encoding = encoding;
36 | this.inputStream = inputStream;
37 | }
38 |
39 | public int getHttpCode() {
40 | return code;
41 | }
42 |
43 | public String getHttpStatus() {
44 | return status;
45 | }
46 |
47 | public InputStream getInputStream() {
48 | return inputStream;
49 | }
50 |
51 | public String getEncoding() {
52 | return encoding;
53 | }
54 |
55 | public String toString() {
56 | return "{code:" + code + ",status:" + status + ",encoding:" + encoding
57 | + "}";
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/net/HttpUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common.net;
6 |
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 |
10 | import common.StreamReader;
11 |
12 | public class HttpUtils {
13 | public final static String getString(HttpResponse response)
14 | throws IOException {
15 | String rtn = null;
16 | rtn = StreamReader.getStringFromStream(response.getInputStream(),
17 | response.getEncoding());
18 | return rtn;
19 | }
20 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/net/Method.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common.net;
6 |
7 | public enum Method {
8 | GET, POST
9 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/java/common/net/test/Test.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright ® 2016 DQ ENCH Co. Ltd.
3 | * All right reserved.
4 | */
5 | package common.net.test;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 |
10 | import common.net.HttpRequest;
11 | import common.net.HttpResponse;
12 | import common.net.HttpUtils;
13 | import common.net.Method;
14 |
15 | public class Test {
16 | public static void main(String[] args) throws Exception {
17 | String ak="";
18 | String service_id="";
19 | String entity_name=""; //实体名称,实体是指一个人或一台车。
20 | String point_list="D:\\MyCsv.csv";//批量上传坐标文件路径
21 | String coord_type="1"; //1:GPS经纬度坐标2:国测局加密经纬度坐标 3:百度加密经纬度坐标
22 | String latitude=""; //用于单点上传的纬度
23 | String longitude=""; //用于单点上传的经度
24 | String loc_time=""; //用于单点上传坐标的轨迹点采集的GPS时间,类型是时间戳
25 | String return_type="0"; //0代表返回全部结果,1代表只返回entity_name字段。默认值为0
26 | //----------------以下参数是用于查询历史轨迹点的参数--------------
27 | String start_time="";//查询历史轨迹点的开始时间 类型是时间戳
28 | String end_time=""; //查询历史轨迹点的结束时间 类型是时间戳
29 | String sort_type="0";//默认值是0:返回轨迹点按loc_time从大到小排序;当设为1时,则反之
30 | String simple_return="0";//默认值是0,当设为1时,仅返回轨迹点的经纬度
31 | String is_processed="0";//默认值是0。0为返回原始轨迹,1为返回纠偏轨迹
32 |
33 | //添加一个新的entity
34 | //addEntity(ak,service_id,entity_name);
35 | //批量上传坐标集合
36 | //addpoints(ak,service_id,entity_name,point_list);
37 | //单条上传坐标
38 | //addpoint(ak,service_id,entity_name,coord_type,latitude,longitude,loc_time);
39 | //查询所有的entity
40 | //listEntity(ak,service_id,return_type);
41 | //查询指定的entity
42 | //serviceEntity(ak,service_id,entity_name,return_type);
43 | //查询历史轨迹
44 | gethistory(ak,service_id,entity_name,start_time,end_time,sort_type,simple_return,is_processed);
45 | }
46 |
47 | /**
48 | * 添加一个新的entity,一个entity可以是一个人、一辆车、或者任何运动的物体
49 | * @author 郭楠 20160411
50 | * @param ak 百度申请的ak
51 | * @param service_id service的ID,作为其唯一标识
52 | * @param entity_name 要添加的一个实体的名称
53 | * @return void
54 | */
55 | public static void addEntity(String ak,String service_id,String entity_name) throws IOException{
56 | System.out.println("============开始添加entity==============");
57 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/entity/add");
58 | request.setMethod(Method.POST);
59 | request.addParam("ak", ak);
60 | request.addParam("service_id", service_id);
61 | request.addParam("entity_name", entity_name);
62 | HttpResponse response = request.exeute();
63 | System.out.println(response);
64 | System.out.println(HttpUtils.getString(response));
65 | System.out.println("============结束添加entity==============");
66 | }
67 |
68 |
69 | /**
70 | * 批量上传坐标集合
71 | * @author 郭楠 20160411
72 | * @param ak 百度申请的ak
73 | * @param service_id 服务id 百度申请的
74 | * @param entity_name 指定的实体 如 一个人,一台车
75 | * @param point_list 坐标集合
76 | * @return void
77 | */
78 | public static void addpoints(String ak,String service_id,String entity_name,String point_list) throws IOException{
79 | System.out.println("============开始批量上传坐标==============");
80 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/track/addpoints");
81 | request.setMethod(Method.POST);
82 | request.addParam("ak", ak);
83 | request.addParam("service_id", service_id);
84 | request.addParam("entity_name", entity_name);
85 | request.addFile("point_list", new File(point_list));
86 | HttpResponse response = request.exeute();
87 | System.out.println(response);
88 | System.out.println(HttpUtils.getString(response));
89 | System.out.println("============结束批量上传坐标==============");
90 | }
91 |
92 | /**
93 | * 单条上传坐标
94 | * @author 郭楠 20160411
95 | * @param ak 百度申请的ak
96 | * @param service_id 服务id 百度申请的
97 | * @param entity_name 指定的实体 如 一个人,一台车
98 | * @param coord_type 1:GPS经纬度坐标2:国测局加密经纬度坐标 3:百度加密经纬度坐标。
99 | * @param latitude 纬度
100 | * @param longitude 经度
101 | * @param loc_time 轨迹点采集的GPS时间
102 | * @return void
103 | */
104 | public static void addpoint(String ak,String service_id,String entity_name,String coord_type,
105 | String latitude,String longitude,String loc_time)
106 | throws IOException{
107 | System.out.println("============开始单条上传坐标==============");
108 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/track/addpoint");
109 | request.setMethod(Method.POST);
110 | request.addParam("ak", ak);
111 | request.addParam("service_id", service_id);
112 | request.addParam("entity_name", entity_name);
113 | request.addParam("latitude", latitude);
114 | request.addParam("longitude", longitude);
115 | request.addParam("coord_type", coord_type);
116 | request.addParam("loc_time", loc_time);
117 | HttpResponse response = request.exeute();
118 | System.out.println(response);
119 | System.out.println(HttpUtils.getString(response));
120 | System.out.println("============结束单条上传坐标==============");
121 | }
122 |
123 | /**
124 | * 查询所有的entity
125 | * @author 郭楠 20160411
126 | * @param ak 百度申请的ak
127 | * @param service_id 服务id 百度申请的
128 | * @param return_type 0代表返回全部结果,1代表只返回entity_name字段。默认值为0。
129 | * @return void
130 | */
131 | public static void listEntity(String ak,String service_id,String return_type) throws IOException{
132 | System.out.println("============开始查询所有的entity==============");
133 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/entity/list");
134 | request.setMethod(Method.GET);
135 | request.addParam("ak", ak);
136 | request.addParam("service_id", service_id);
137 | request.addParam("return_type", return_type);
138 | HttpResponse response = request.exeute();
139 | System.out.println(response);
140 | System.out.println(HttpUtils.getString(response));
141 | System.out.println("============结束查询所有的entity==============");
142 | }
143 |
144 | /**
145 | * 查询指定的entity
146 | * @author 郭楠 20160411
147 | * @param ak 百度申请的ak
148 | * @param service_id 服务id 百度申请的
149 | * @param entity_name 要检索的实体名称
150 | * @param return_type 0代表返回全部结果,1代表只返回entity_name字段。默认值为0。
151 | * @return void
152 | */
153 | public static void serviceEntity(String ak,String service_id,String entity_name,String return_type) throws IOException{
154 | System.out.println("============开始查询指定的entity==============");
155 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/entity/list");
156 | request.setMethod(Method.GET);
157 | request.addParam("ak", ak);
158 | request.addParam("service_id", service_id);
159 | request.addParam("entity_names", entity_name);
160 | request.addParam("return_type", return_type);
161 | HttpResponse response = request.exeute();
162 | System.out.println(response);
163 | System.out.println(HttpUtils.getString(response));
164 | System.out.println("============结束查询指定的entity==============");
165 | }
166 |
167 | /**
168 | * 查询历史轨迹
169 | * @author 郭楠 20160411
170 | * @param ak 百度申请的ak
171 | * @param service_id 服务id 百度申请的
172 | * @param entity_name 指定的实体 如 一个人,一台车
173 | * @param start_time 起始时间
174 | * @param end_time 结束时间
175 | * @param sort_type 默认值是0:返回轨迹点按loc_time从大到小排序;当设为1时,则反之。
176 | * @param simple_return 默认值是0,当设为1时,仅返回轨迹点的经纬度。
177 | * @param is_processed 默认值是0。0为返回原始轨迹,1为返回纠偏轨迹。
178 | * 注意:轨迹纠偏功能包括去噪、抽稀、绑路三个步骤,
179 | * 当is_processed=1时,默认仅进行去噪和抽稀处理
180 | * ,并不作绑路处理。若应用为车辆轨迹追踪类型,需要开通绑路操作,
181 | * 可发邮件至:baiduyingyan@baidu.com,
182 | * 注明:ak、service_id和同时在线车辆数,申请开通。
183 | * @return void
184 | */
185 | public static void gethistory(String ak,String service_id,String entity_name,String start_time,String end_time,
186 | String sort_type,String simple_return,String is_processed)
187 | throws IOException{
188 | System.out.println("============开始查询历史轨迹==============");
189 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/track/gethistory");
190 | request.setMethod(Method.GET);
191 | request.addParam("ak", ak);
192 | request.addParam("service_id", service_id);
193 | request.addParam("entity_name", entity_name);
194 | request.addParam("start_time", start_time);
195 | request.addParam("end_time", end_time);
196 | request.addParam("sort_type", sort_type);
197 | request.addParam("simple_return", simple_return);
198 | request.addParam("is_processed", is_processed);
199 | HttpResponse response = request.exeute();
200 | System.out.println(response);
201 | System.out.println(HttpUtils.getString(response));
202 | System.out.println("============结束查询历史轨迹==============");
203 | }
204 |
205 | /**
206 | * 删除指定的entity
207 | * @author 郭楠 20160411
208 | * @param ak 百度申请的ak
209 | * @param service_id 服务id 百度申请的
210 | * @param entity_name entity名称,作为其唯一标识。
211 | * @return void
212 | */
213 | public static void deleteEntity(String ak,String service_id,String entity_name) throws IOException{
214 | System.out.println("============开始删除指定的entity==============");
215 | HttpRequest request = new HttpRequest("http://api.map.baidu.com/trace/v2/entity/delete");
216 | request.setMethod(Method.POST);
217 | request.addParam("ak", ak);
218 | request.addParam("service_id", service_id);
219 | request.addParam("entity_name", entity_name);
220 | HttpResponse response = request.exeute();
221 | System.out.println(response);
222 | System.out.println(HttpUtils.getString(response));
223 | System.out.println("============结束删除指定的entity==============");
224 | }
225 |
226 |
227 | }
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-hdpi/fileke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-hdpi/fileke.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-hdpi/folderke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-hdpi/folderke.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
20 |
21 |
25 |
34 |
35 |
36 |
37 |
42 |
43 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/layout/chose_all_files.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
24 |
25 |
26 |
34 |
35 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/layout/chose_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
14 |
15 |
16 |
24 |
25 |
26 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/layout/line.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/layout/popup.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | UploadTol
5 | 选择文件
6 | 选择文件夹
7 |
8 | Settings
9 | 选择文件
10 | 选择文件夹
11 | 开始上传
12 |
13 | FileName
14 |
15 |
16 | 上一级目录
17 |
18 |
19 |
--------------------------------------------------------------------------------
/UploadTool/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/UploadTool/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | jcenter()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.1.0-rc1'
8 | }
9 | }
10 |
11 | allprojects {
12 | repositories {
13 | jcenter()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/UploadTool/build/generated/mockable-android-17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/build/generated/mockable-android-17.jar
--------------------------------------------------------------------------------
/UploadTool/build/intermediates/dex-cache/cache.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/UploadTool/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jdsjlzx/uploadFile/b221f8b648f275d4034f3dce5b89fec12ddfed9e/UploadTool/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/UploadTool/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/UploadTool/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/UploadTool/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/UploadTool/import-summary.txt:
--------------------------------------------------------------------------------
1 | ECLIPSE ANDROID PROJECT IMPORT SUMMARY
2 | ======================================
3 |
4 | Ignored Files:
5 | --------------
6 | The following files were *not* copied into the new Gradle project; you
7 | should evaluate whether these are still needed in your project and if
8 | so manually move them:
9 |
10 | * ic_launcher-web.png
11 | * proguard-project.txt
12 |
13 | Replaced Jars with Dependencies:
14 | --------------------------------
15 | The importer recognized the following .jar files as third party
16 | libraries and replaced them with Gradle dependencies instead. This has
17 | the advantage that more explicit version information is known, and the
18 | libraries can be updated automatically. However, it is possible that
19 | the .jar file in your project was of an older version than the
20 | dependency we picked, which could render the project not compileable.
21 | You can disable the jar replacement in the import wizard and try again:
22 |
23 | android-support-v4.jar => com.android.support:support-v4:18.0.0
24 |
25 | Moved Files:
26 | ------------
27 | Android Gradle projects use a different directory structure than ADT
28 | Eclipse projects. Here's how the projects were restructured:
29 |
30 | * AndroidManifest.xml => app\src\main\AndroidManifest.xml
31 | * assets\ => app\src\main\assets
32 | * libs\commons-codec-1.8.jar => app\libs\commons-codec-1.8.jar
33 | * libs\sun.misc.BASE64Decoder.jar => app\libs\sun.misc.BASE64Decoder.jar
34 | * res\ => app\src\main\res\
35 | * src\ => app\src\main\java\
36 |
37 | Next Steps:
38 | -----------
39 | You can now build the project. The Gradle project needs network
40 | connectivity to download dependencies.
41 |
42 | Bugs:
43 | -----
44 | If for some reason your project does not build, and you determine that
45 | it is due to a bug or limitation of the Eclipse to Gradle importer,
46 | please file a bug at http://b.android.com with category
47 | Component-Tools.
48 |
49 | (This import summary is for your information only, and can be deleted
50 | after import once you are satisfied with the results.)
51 |
--------------------------------------------------------------------------------
/UploadTool/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | #
6 | #Thu Apr 21 09:50:42 CST 2016
7 | sdk.dir=D\:\\android\\sdk
8 |
--------------------------------------------------------------------------------
/UploadTool/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------