Writes the given value with the given writer.
@param writer
@param values
@throws IOException
@author vvakame
429324
public static void putByteList(Writer writer, List<Byte> values) throws IOException {
		if (values == null) {
			writer.write("null");
		} else {
			startArray(writer);
			for (int i = 0; i < values.size(); i++) {
				put(writer, values.get(i));
				if (i != values.size() - 1) {
					addSeparator(writer);
				}
			}
			endArray(writer);
		}
	}
210562
public void writeOut(Writer writer) throws IOException {

	Entity e = root;
	while (e.next != null) {
	    e = e.next;
	    writer.write(e.data);
	}
	writer.write(buffer, 0, pos);
    }
937751
private static void writeValue(ObjectOutput out, Fieldable field) throws IOException
   {
      Object o = field.stringValue();
      if (o != null)
      {
         // Use writeObject instead of writeUTF because the value could contain unsupported
         // characters
         out.writeObject(o);
         return;
      }
      o = field.tokenStreamValue();
      if (o != null)
      {
         out.writeObject(o);
         return;
      }
      o = field.readerValue();
      throw new RuntimeException("Unsupported value " + o);
   }
317847
private void writeFields(JsonWriterImpl out, Object value)
  {
    for (JsonField field : _fields) {
      field.write(out, value);
    }
  }
715154
@Override
    public void write(DataWriter writer) throws IOException {
        writer.writeInt(pos);  /* array position */
        writer.writeInt(val);  /* data value */
        writer.writeLong(scn); /* SCN value */
    }
449342
public void writeFields(String[] fields) throws IOException {

		if (newWriter) {
			this.newWriter = false;
		} else {
			this.newLine();
		}
		for (int i = 0; i < fields.length; i++) {
			this.writeField(fields[i]);
		}
	}
623686
private void writeStringField(String fieldName, Object value) throws IOException
   {
      String val = value.toString();
      if (!val.isEmpty())
      {
         m_writer.writeNameValuePair(fieldName, val);
      }
   }
1008269
public static <T> byte[] write(Buffer.Writer<T> writer, T value) {
    Buffer b = Buffer.allocate(writer.sizeInBytes(value));
    try {
      writer.write(value, b);
    } catch (RuntimeException e) {
      byte[] bytes = b.toByteArray();
      int lengthWritten = bytes.length;
      for (int i = 0; i < bytes.length; i++) {
        if (bytes[i] == 0) {
          lengthWritten = i;
          break;
        }
      }

      final byte[] bytesWritten;
      if (lengthWritten == bytes.length) {
        bytesWritten = bytes;
      } else {
        bytesWritten = new byte[lengthWritten];
        System.arraycopy(bytes, 0, bytesWritten, 0, lengthWritten);
      }

      String written = new String(bytesWritten, UTF_8);
      // Don't use value directly in the message, as its toString might be implemented using this
      // method. If that's the case, we'd stack overflow. Instead, emit what we've written so far.
      String message =
        format(
          "Bug found using %s to write %s as json. Wrote %s/%s bytes: %s",
          writer.getClass().getSimpleName(),
          value.getClass().getSimpleName(),
          lengthWritten,
          bytes.length,
          written);
      throw Platform.get().assertionError(message, e);
    }
    return b.toByteArray();
  }
1122334
public Writer write(Writer writer) throws JSONException {
        try {
            if (m_map.isEmpty()) {
                writer.write("{}");
                return writer;
            }
            // This prefix value applies to the first key only
            String keyprefix = "{\"";
            for (Entry<String, Object> entry : m_map.entrySet()) {
                writer.write(keyprefix);
                writer.write(quotable(entry.getKey()));
                writer.write("\":");
                Object v = entry.getValue();
                if (v instanceof JSONObject) {
                    ((JSONObject)v).write(writer);
                }
                else if (v instanceof JSONArray) {
                    ((JSONArray)v).write(writer);
                }
                else {
                    writer.write(valueToString(v));
                }
                // This prefix value applies to all subsequent keys
                keyprefix = ",\"";
            }
            writer.write('}');
            return writer;
        }
        catch (IOException exception) {
            throw new JSONException(exception);
        }
     }
536501
@Override
    public void write(final Writer writer) throws ConfigurationException, IOException {
        Preconditions.checkNotNull(writer);

        @SuppressWarnings("unchecked") final
        HashMap<String, Object> settings = (HashMap<String, Object>) fromNode(this.getModel().getInMemoryRepresentation());
        this.mapper.writerWithDefaultPrettyPrinter().writeValue(writer, settings);
    }
685052
public static void writeLine(BufferedWriter writer, String line) throws IOException {
        writer.write(line);
        writer.newLine();
    }
1232414
def WriteRow(self, values):
    
    precondition.AssertIterableType(values, text)

    if compatibility.PY2:
      self._csv.writerow([value.encode("utf-8") for value in values])
    else:
      self._csv.writerow(values)
1279050
public static void writeValue(JsonWriter writer, String name, String value) throws IOException {
        writer.name(name).value(value);
    }
115563
public void write(byte... values) {
        if (count >= content.length - values.length) {
            byte[] ns = new byte[content.length + values.length];
            System.arraycopy(content, 0, ns, 0, count);
            this.content = ns;
        }
        System.arraycopy(values, 0, content, count, values.length);
        count += values.length;
    }
1062033
private static void listToWriter(List<?> list, JsonWriter writer) throws IOException {
    writer.beginArray();
    for (Object value : list) {
      writeValue(value, writer);
    }
    writer.endArray();
  }
707832
public static void put(Writer writer, Enum<?> value) throws IOException {
		if (value == null) {
			writer.write("null");
		} else {
			writer.write("\"");
			writer.write(sanitize(value.name()));
			writer.write("\"");
		}
	}
652237
private void writeValue(Type expected, Object value, TreePruner pruner, DataWriter writer) throws IOException {
        writeValue(expected,value,pruner,writer,writer.getExportConfig().isSkipIfFail());
    }