MCPcopy Index your code
hub / github.com/socketio/socket.io-client-java / toArray

Method toArray

src/main/java/io/socket/client/Socket.java:510–524  ·  view source on GitHub ↗
(JSONArray array)

Source from the content-addressed store, hash-verified

508 }
509
510 private static Object[] toArray(JSONArray array) {
511 int length = array.length();
512 Object[] data = new Object[length];
513 for (int i = 0; i < length; i++) {
514 Object v;
515 try {
516 v = array.get(i);
517 } catch (JSONException e) {
518 logger.log(Level.WARNING, "An error occured while retrieving data from JSONArray", e);
519 v = null;
520 }
521 data[i] = JSONObject.NULL.equals(v) ? null : v;
522 }
523 return data;
524 }
525
526 public Socket onAnyIncoming(Listener fn) {
527 this.onAnyIncomingListeners.add(fn);

Callers 7

packetMethod · 0.95
oneventMethod · 0.95
onackMethod · 0.95
emitBufferedMethod · 0.80
deconstructPacketMethod · 0.80
encodeAsBinaryMethod · 0.80
takeBinaryDataMethod · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected