Audiovox P965 Arkusz Danych Strona 95

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 280
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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;
Przeglądanie stron 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 279 280

Komentarze do niniejszej Instrukcji

Brak uwag