• 大小: 0.13M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: Java
  • 标签: java  

资源简介


Android tcp客户端传输数据及上传、下载文件的demo,功能简单,仅供参考

资源截图

代码片段和文件信息

package com.lanjian.pa100net;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumented test which will execute on an Android device.
 *
 * @see Testing documentation
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals(“com.lanjian.pa100net“ appContext.getPackageName());
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件          95  2018-06-28 11:18  PA100Net\.gitignore
     目录           0  2018-06-27 09:06  PA100Net\app\
     文件           8  2018-06-26 13:31  PA100Net\app\.gitignore
     文件        1100  2018-06-27 09:00  PA100Net\app\build.gradle
     目录           0  2018-06-26 13:31  PA100Net\app\libs\
     文件         772  2018-06-26 13:31  PA100Net\app\proguard-rules.pro
     目录           0  2018-06-26 13:31  PA100Net\app\src\
     目录           0  2018-06-26 13:31  PA100Net\app\src\androidTest\
     目录           0  2018-06-26 13:31  PA100Net\app\src\androidTest\java\
     目录           0  2018-06-26 13:31  PA100Net\app\src\androidTest\java\com\
     目录           0  2018-06-26 13:31  PA100Net\app\src\androidTest\java\com\lanjian\
     目录           0  2018-06-26 13:31  PA100Net\app\src\androidTest\java\com\lanjian\pa100net\
     文件         767  2018-06-26 13:31  PA100Net\app\src\androidTest\java\com\lanjian\pa100net\ExampleInstrumentedTest.java
     目录           0  2018-06-27 09:07  PA100Net\app\src\main\
     文件        1553  2018-06-27 09:07  PA100Net\app\src\main\AndroidManifest.xml
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\java\
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\java\com\
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\java\com\lanjian\
     目录           0  2018-06-28 10:48  PA100Net\app\src\main\java\com\lanjian\pa100net\
     文件        1742  2018-06-28 08:59  PA100Net\app\src\main\java\com\lanjian\pa100net\MainActivity.java
     文件        4964  2018-06-28 10:48  PA100Net\app\src\main\java\com\lanjian\pa100net\TcpClient.java
     文件        1725  2018-06-26 16:39  PA100Net\app\src\main\java\com\lanjian\pa100net\TcpServer.java
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\res\
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\res\drawable\
     文件        5776  2018-06-26 13:31  PA100Net\app\src\main\res\drawable\ic_launcher_background.xml
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\res\drawable-v24\
     文件        1914  2018-06-26 13:31  PA100Net\app\src\main\res\drawable-v24\ic_launcher_foreground.xml
     目录           0  2018-06-26 13:33  PA100Net\app\src\main\res\layout\
     文件        5504  2018-06-26 13:33  PA100Net\app\src\main\res\layout\activity_main.xml
     目录           0  2018-06-26 13:31  PA100Net\app\src\main\res\mipmap-anydpi-v26\
     文件         276  2018-06-26 13:31  PA100Net\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml
............此处省略36个文件信息

评论

共有 条评论