• 大小: 0.03M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-23
  • 标签: Android  IP  c  d  ZIP  

资源简介

AndroidUSBCommunication

资源截图

代码片段和文件信息

import java.io.IOException;
import java.io.objectInputStream;
import java.io.objectOutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

public class USBClient
{
public static void main(String[] args) throws IOException
{
Socket echoSocket = null;
objectOutputStream out = null;
objectInputStream in = null;
String message = ““;

// Create socket connection with host address as localhost and port number with 38300 
try
{
echoSocket = new Socket(“localhost“ 38300);
out = new objectOutputStream(echoSocket.getOutputStream());
out.flush();
in = new objectInputStream(echoSocket.getInputStream());

// Communicating with the server
try
{
message = (String) in.readobject();
System.out.println(“server>“ + message);
}
catch (Cl

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\
     文件         255  2012-09-07 12:57  Android-USB-Communication-master\ReadMe.txt
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBClient\
     文件         295  2012-09-07 12:57  Android-USB-Communication-master\USBClient\.classpath
     文件         368  2012-09-07 12:57  Android-USB-Communication-master\USBClient\.project
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBClient\.settings\
     文件         617  2012-09-07 12:57  Android-USB-Communication-master\USBClient\.settings\org.eclipse.jdt.core.prefs
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBClient\bin\
     文件        2441  2012-09-07 12:57  Android-USB-Communication-master\USBClient\bin\USBClient.class
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBClient\src\
     文件        1400  2012-09-07 12:57  Android-USB-Communication-master\USBClient\src\USBClient.java
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\
     文件         281  2012-09-07 12:57  Android-USB-Communication-master\USBComm\.classpath
     文件         810  2012-09-07 12:57  Android-USB-Communication-master\USBComm\.project
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\.settings\
     文件          86  2012-09-07 12:57  Android-USB-Communication-master\USBComm\.settings\org.eclipse.core.resources.prefs
     文件         134  2012-09-07 12:57  Android-USB-Communication-master\USBComm\.settings\org.eclipse.ltk.core.refactoring.prefs
     文件         743  2012-09-07 12:57  Android-USB-Communication-master\USBComm\AndroidManifest.xml
     文件          19  2012-09-07 12:57  Android-USB-Communication-master\USBComm\ReadMe.md
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\
     文件         743  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\AndroidManifest.xml
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\
     目录           0  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\
     文件         333  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\BuildConfig.class
     文件         322  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\R$attr.class
     文件         382  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\R$drawable.class
     文件         435  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\R$id.class
     文件         376  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\R$layout.class
     文件         477  2012-09-07 12:57  Android-USB-Communication-master\USBComm\bin\classes\com\demo\usb\R$string.class
............此处省略28个文件信息

评论

共有 条评论