Write a Key : value entry to a stream
430620
public static void writeJSONKV(String key, Object value, Appendable out, JSONStyle compression) throws IOException {
		if (key == null)
			out.append("null");
		else if (!compression.mustProtectKey(key))
			out.append(key);
		else {
			out.append('"');
			JSONValue.escape(key, out, compression);
			out.append('"');
		}
		out.append(':');
		if (value instanceof String)
			compression.writeString(out, (String) value);
		else
			JSONValue.writeJSONString(value, out, compression);
	}
1160456
public void write(KEYOUT key, VALUEOUT value
                    ) throws IOException, InterruptedException {
    output.write(key, value);
  }
189558
def _wr_ver_n_key(self, fout_txt, verbose):
        """"""
        with open(fout_txt, 'w') as prt:
            self._prt_ver_n_key(prt, verbose)
            print('               WROTE: {TXT}'.format(TXT=fout_txt))
1357457
private void writeObject(ObjectOutputStream stream) throws IOException {
    stream.writeInt(_capacity);
    stream.writeInt(_size);
    int count = 0;
    EntryImpl<K, V> entry = _mapFirst;
    while (entry != null) {
      stream.writeObject(entry._key);
      stream.writeObject(entry._value);
      count++;
      entry = entry._after;
    }
    if (count != _size) { throw new IOException("FastMap Corrupted"); }
  }
99206
function Entry(key, val, index) {
    this.key = key;
    this.val = val;
    this.index = index;
  }
198502
private void writeMap(String fieldName, Object value) throws IOException
   {
      @SuppressWarnings("unchecked")
      Map<String, Object> map = (Map<String, Object>) value;
      m_writer.writeStartObject(fieldName);
      for (Map.Entry<String, Object> entry : map.entrySet())
      {
         Object entryValue = entry.getValue();
         if (entryValue != null)
         {
            DataType type = TYPE_MAP.get(entryValue.getClass().getName());
            if (type == null)
            {
               type = DataType.STRING;
               entryValue = entryValue.toString();
            }
            writeField(entry.getKey(), type, entryValue);
         }
      }
      m_writer.writeEndObject();
   }
256551
def write_byte(self, value):
        
        if isinstance(value, bytes):
            self.stream.write(value)
        elif isinstance(value, str):
            self.stream.write(value.encode('utf-8'))
        elif isinstance(value, int):
            self.stream.write(bytes([value]))
19265
protected void writeMapEntry(String key, Object value, CharBuf buffer) {
        buffer.addJsonFieldName(key, disableUnicodeEscaping);
        writeObject(key, value, buffer);
    }
228781
function(stream) {
		var exportKey = function(line, env) {
			var obj = JSON.parse(' ' + line);

			var keyString = keyStringGenerator(obj, env);

			return keyString + separator + line;
		};

		return stream.pipe(jp.map(exportKey));
	}
861746
static String mapEntryToString(Object key, Object val) {
        final String k, v;
        final int klen, vlen;
        final char[] chars =
            new char[(klen = (k = objectToString(key)).length()) +
                     (vlen = (v = objectToString(val)).length()) + 1];
        k.getChars(0, klen, chars, 0);
        chars[klen] = '=';
        v.getChars(0, vlen, chars, klen + 1);
        return new String(chars);
    }
690608
function writeKey(key, value, masterPassword) {
    var contents = getContents(masterPassword);
    contents[key] = value;
    var fileContents = JSON.stringify(contents);
    var encryptedFileContents = encryption.encrypt(fileContents, masterPassword);
    file.writeToFile(encryptedFileContents);
}
1282072
def write_to_stream(self, stream_id, data, sandbox=None):
        
        if sandbox is not None:
            raise NotImplementedError

        if stream_id not in self.streams:
            raise StreamNotFoundError("Stream with id '{}' does not exist".format(stream_id))

        writer = self.get_stream_writer(self.streams[stream_id])

        if isinstance(data, StreamInstance):
            data = [data]

        for instance in data:
            if not isinstance(instance, StreamInstance):
                raise ValueError("Expected StreamInstance, got {}".format(str(type(instance))))
            writer(instance)
1348415
def _write_txt(self, stream):
        '''
        

        '''
        for rec in self.data:
            fields = []
            for prop in self.properties:
                fields.extend(prop._to_fields(rec[prop.name]))

            _np.savetxt(stream, [fields], '%.18g', newline='\n')
902656
public void writeObject (ObjectOutputStream out)
        throws IOException
    {
        int ecount = size();
        out.writeInt(ecount);
        for (Map.Entry<K, V> entry : entrySet()) {
            out.writeObject(entry.getKey());
            out.writeObject(entry.getValue());
        }
    }
435495
def write(key, value):
    '''
    
    '''
    try:
        key = target(key)
        log.trace('Writing %s to %s', value, key)
        with salt.utils.files.fopen(key, 'w') as twriter:
            twriter.write(
                salt.utils.stringutils.to_str('{0}\n'.format(value))
            )
            return True
    except Exception:
        return False
396585
def write(key, data = nil, parameters = {}, conditions = {})
      if writable?(key, parameters, conditions)
        if File.file?(path = pathify(key, parameters))
          write_file(path, data)
        else
          create_path(path) && write_file(path, data)
        end
      end
    end
166068
def _write_wrapper(self, name):
        
        io_attr = getattr(self._io, name)

        def write_wrapper(*args, **kwargs):
            """Wrap all write calls to the stream object."""
            ret_value = io_attr(*args, **kwargs)
            if not IS_PY2:
                return ret_value

        return write_wrapper