Audiovox P965 Arkusz Danych Strona 106

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 280
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 105
API in Java
103
for (byte c : command.getBytes("US-ASCII")) {
ret[i++] = c;
}
} else {
String[] str = command.split("\n");
int i = 1;
int[] iTmp = new int[str.length];
for (int a = 0; a < str.length; a++) {
iTmp[a] = writeLen(str[a]).length + str[a].length();
}
for (int b : iTmp) {
i += b;
}
ret = new byte[i];
int counter = 0;
for (int a = 0; a < str.length; a++) {
int j = 0;
byte[] b = writeLen(str[a]);
for (j = 0; j < b.length; j++) {
ret[counter++] = b[j];
}
for (byte c : str[a].getBytes("US-ASCII")) {
ret[counter++] = c;
}
}
}
out.write(ret);
return "Sent successfully";
} catch (IOException ex) {
Logger.getLogger(WriteCommand.class.getName()).log(Level.SEVERE, null, ex);
return "failed";
}
}
}
References
[1] http:/ / www. mikrotik. com/ download/ libAPI. jar
Przeglądanie stron 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 279 280

Komentarze do niniejszej Instrukcji

Brak uwag