Audiovox P965 Datový list Strana 95

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 280
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 94
API in Java
92
}
@Override
public void run() {
String s = "";
while (true) {
try {
s = aConn.getData();
if (s != null) {
t3A.outputHere(s);
if (s.contains("!done")) {
}
}
} catch (InterruptedException ex) {
Logger.getLogger(DataReceiver.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
Code
Code that is ready to be compiled and used. In some places some comments may be missing. Compiled jar file
[1]
of
same java classes
ApiConn.java
Main file of the package
package libAPI;
/*
* This contains connection. Everything should be here,
* should operate with this class only
*/
import java.io.*;
import java.net.*;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author janisk
*/
public class ApiConn extends Thread {
private Socket sock = null;
Zobrazit stránku 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 279 280

Komentáře k této Příručce

Žádné komentáře