Send JSON representation of given data object to all connections tagged with all give tag labels
@param data the data object
@param labels the tag labels
486311
public void sendJsonToTagged(Object data, String ... labels) {
        for (String label : labels) {
            sendJsonToTagged(data, label);
        }
    }
595112
public void encodeData(AsnOutputStream asnOs) throws MAPException {

        if (this.lcsCodewordString == null)
            throw new MAPException("lcsCodewordString must not be null");

        try {
            asnOs.writeOctetString(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_DATA_CODING_SCHEME,
                    new byte[] { (byte) this.dataCodingScheme.getCode() });

            ((USSDStringImpl) this.lcsCodewordString).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_CODE_WORD_STRING);
        } catch (IOException e) {
            throw new MAPException("IOException when encoding LCSClientName", e);
        } catch (AsnException e) {
            throw new MAPException("AsnException when encoding LCSClientName", e);
        }
    }
961733
public void sendMessage(String message){

		byte[] datagramData = message.getBytes();
		datagramPacket.setData(datagramData);

		try {
			datagramSocket.send(datagramPacket);
		} catch (IOException e) {
			Log.e(TAG, "Failed to send datagram log " + e);
		}
	}
1177844
public void setNodeData(byte[] nodeData)
    {
        this.nodeData = (nodeData != null) ? Arrays.copyOf(nodeData, nodeData.length) : null;
    }
1171378
public static <T extends HierarchyEntity<T, ?>> Map<T, String> tag(List<T> datas, String property) {
    final Map<T, String> sortedMap = CollectUtils.newHashMap();
    for (T de : datas) {
      String myId = null;
      if (null == property) {
        myId = String.valueOf(de.getId());
      } else {
        try {
          myId = String.valueOf(PropertyUtils.getProperty(de, property));
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }
      myId = myId + "_";
      if (null != de.getParent() && sortedMap.containsKey(de.getParent())) {
        myId = String.valueOf(sortedMap.get(de.getParent()) + myId);
        if (!myId.endsWith("_")) {
          myId += "_";
        }
      }
      updatedTagFor(myId, de, sortedMap);
      sortedMap.put(de, myId);
    }
    for (T de : datas) {
      String tag = sortedMap.get(de);
      if (tag.endsWith("_")) {
        sortedMap.put(de, tag.substring(0, tag.length() - 1));
      }
    }
    return sortedMap;
  }
213032
private void processSpecialTags(JsonParser jsonParser) throws IOException {
        LOG.info("@odata tags found - start parsing");
        String key = jsonParser.getCurrentName();
        jsonParser.nextToken();
        String value = jsonParser.getText();
        odataValues.put(key, value);
    }
569272
public void encodeData(AsnOutputStream asnOs) throws MAPException {
        if (this.lcsClientType == null)
            throw new MAPException("lcsClientType must not be null");

        try {
            asnOs.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_CLIENT_TYPE, this.lcsClientType.getType());
        } catch (IOException e) {
            throw new MAPException("IOException when encoding parameter lcsClientType: ", e);
        } catch (AsnException e) {
            throw new MAPException("AsnException when encoding parameter lcsClientType: ", e);
        }

        if (this.lcsClientExternalID != null) {
            // Encode lcsClientExternalID [1] LCSClientExternalID OPTIONAL,
            ((LCSClientExternalIDImpl) this.lcsClientExternalID).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC,
                    _TAG_LCS_CLIENT_EXTERNAL_ID);
        }

        if (this.lcsClientDialedByMS != null) {
            // lcsClientDialedByMS [2] AddressString OPTIONAL,
            ((AddressStringImpl) this.lcsClientDialedByMS).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC,
                    _TAG_LCS_CLIENT_DIALED_BY_MS);
        }

        if (this.lcsClientInternalID != null) {
            // lcsClientInternalID [3] LCSClientInternalID OPTIONAL,
            try {
                asnOs.writeInteger(Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_CLIENT_INTERNAL_ID, this.lcsClientInternalID.getId());
            } catch (IOException e) {
                throw new MAPException("IOException when encoding parameter lcsClientInternalID: ", e);
            } catch (AsnException e) {
                throw new MAPException("AsnException when encoding parameter lcsClientInternalID: ", e);
            }
        }

        if (this.lcsClientName != null) {
            // lcsClientName [4] LCSClientName
            ((LCSClientNameImpl) this.lcsClientName).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_CLIENT_NAME);
        }

        if (this.lcsAPN != null) {
            // lcsAPN [5] APN OPTIONAL,
            ((APNImpl) this.lcsAPN).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_APN);
        }

        if (this.lcsRequestorID != null) {
            // lcsRequestorID [6] LCSRequestorID
            ((LCSRequestorIDImpl) this.lcsRequestorID).encodeAll(asnOs, Tag.CLASS_CONTEXT_SPECIFIC, _TAG_LCS_REQUESTOR_ID);
        }
    }
1294410
public void writeData(Object[] data, Type[] types) {
        writeData(types.length, types, data, null, null);
    }
934122
public void setLabels(Collection<LabelType> labels) {
    this.labels.clear();
    if (labels != null) {
      this.labels.addAll(labels);
    }
  }
156167
@Override
    public void putGraph(Model data) {

        if (data == null)
            return;

        // Use HTTP protocol if possible
        if (this.sparqlServiceEndpoint != null) {
            datasetAccessor.putModel(data);
        } else {
            this.putGraphSparqlQuery(data);
        }

    }
515666
function sendJson(data, options, callback) {
  var jsonData = JSON.stringify(data);
  return this.send(jsonData, options, callback);
}
161989
public void sendData(byte[] data) throws ResponseException {
        if(con.isClosed()) return;

        Socket socket = null;
        try {
            socket = conHandler.createDataSocket();
            dataConnections.add(socket);
            OutputStream out = socket.getOutputStream();

            Utils.write(out, data, data.length, conHandler.isAsciiMode());
            bytesTransferred += data.length;

            out.flush();
            Utils.closeQuietly(out);
            Utils.closeQuietly(socket);
        } catch(SocketException ex) {
            throw new ResponseException(426, "Transfer aborted");
        } catch(IOException ex) {
            throw new ResponseException(425, "An error occurred while transferring the data");
        } finally {
            onUpdate();
            if(socket != null) dataConnections.remove(socket);
        }
    }
996712
private void convertIdtoLabelLabels(
      List<Object> idLabels, EntityType entityType, DataService dataService) {
    final int nrLabels = idLabels.size();
    if (nrLabels > 0) {
      // Get entities for ids
      // Use Iterables.transform to work around List<String> to Iterable<Object> cast error
      Stream<Object> idLabelsWithoutNull =
          idLabels
              .stream()
              .filter(Objects::nonNull)
              .map(
                  untypedIdLabel ->
                      EntityUtils.getTypedValue(
                          untypedIdLabel.toString(), entityType.getIdAttribute()));

      // Map entity ids to labels
      Map<String, Entity> idToLabelMap = new HashMap<>();
      dataService
          .findAll(entityType.getId(), idLabelsWithoutNull)
          .forEach(entity -> idToLabelMap.put(entity.getIdValue().toString(), entity));

      for (int i = 0; i < nrLabels; ++i) {
        Object id = idLabels.get(i);
        if (id != null) // missing value label
        {
          idLabels.set(i, idToLabelMap.get(id.toString()));
        }
      }
    }
  }
463518
public void sendMessages(byte[] data)
    {
        try
        {
            out.write(data);
            out.flush();
        }
        catch (final IOException exception)
        {
            Verbose.exception(exception);
        }
    }
1145968
public void write(final String data) throws IOException {
        if (socket != null) {
            out.write(data.getBytes());
        }
    }
777338
public void setData(byte[] data) {
        byte[] copy = new byte[data.length];
        System.arraycopy(data, 0, copy, 0, data.length);
        this.data = copy;
    }
3005
public void setLabels(INDArray... labels) {
        if (labels != null && labels.length != this.numOutputArrays) {
            throw new IllegalArgumentException("Invalid output array: network has " + numOutputArrays
                    + " outputs, but array is of length " + labels.length);
        }
        this.labels = labels;
    }