Writes the given value with the given writer.
@param writer
@param values
@throws IOException
@author vvakame
760161
public static void putFloatList(Writer writer, List<Float> 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);
		}
	}
1335425
public static void put(Writer writer, Character value) throws IOException {
		if (value == null) {
			writer.write("null");
		} else {
			writer.write("\"");
			writer.write(sanitize(value));
			writer.write("\"");
		}
	}
1066897
public static void putStringList(Writer writer, List<String> 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);
		}
	}
1181889
public static void writelnTo(String html, Writer writer) throws IOException {
		writeTo(html, writer);
		writer.write('\n');
	}
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);
   }
622800
public static void writeFile(BufferedInputStream reader,
			BufferedOutputStream writer) throws IOException {
		byte[] buff = new byte[8192];
		int numChars;
		while ((numChars = reader.read(buff, 0, buff.length)) != -1) {
			writer.write(buff, 0, numChars);
		}
	}
382323
protected void setWriter( Writer writer)
    {
    writer_ =
      writer == null
      ? writerFor( System.out)
      : writer;
    }
322917
public void encodeValue(Writer writer, T obj) throws IOException {
		int count = 0;
		for (String key : map.keySet()) {
			JsonUtil.putKey(writer, key);
			JsonPropertyCoder<T, ?> enc = map.get(key);
			enc.encode(writer, obj);
			count++;
			if (count != map.size()) {
				JsonUtil.addSeparator(writer);
			}
		}
	}
829916
public void writeToWriter(Writer out) throws IOException
  {
    int ch;

    while ((ch = readChar()) >= 0) {
      out.write((char) ch);
    }
  }
395180
@Override
  public void write(JsonWriterImpl out, char []value)
  {
    out.write(String.valueOf(value, 0, value.length));
  }
37064
public static final void writeScript(Writer writer)
   throws IOException
   {
	   String newline = IO.newline();
	   
	   boolean isWindows = System.getProperty("os.name").startsWith("Windows");
	   
	   String variablePrefix = "$C";
	   String variableSuffix = File.pathSeparator;
	   
	   if(isWindows)
	   {
		   variablePrefix = "%C";
		   variableSuffix = "%"+File.pathSeparator;
	   }
	   
	String setSyntax = isWindows ? "@set " : "export ";
	   
	String classpath = System.getProperty(CLASSPATH_PROP);
	
	String cpath = null;
	
	HashMap<String, HashSet<Object>> map = new HashMap<String, HashSet<Object>>();
	String folderPath = null;
	HashSet<Object> folderPathClassPaths = null;
	
	for(StringTokenizer tok = new StringTokenizer(classpath,File.pathSeparator);tok.hasMoreTokens();)
	{
	   cpath = tok.nextToken();
	   
	   //get path
	   folderPath = IO.parseFolderPath(cpath);
	   
	   //System.out.println("folderPath="+folderPath);
	   
	   //get list for folder path
	   folderPathClassPaths = (HashSet<Object>)map.get(folderPath);
	   
	   //create if needed
	   if(folderPathClassPaths == null)
	   {
		folderPathClassPaths = new HashSet<Object>();
	   }
	   
	   folderPathClassPaths.add(cpath);
	   
	   //put in map
	   map.put(folderPath, folderPathClassPaths);	   	   
	   
	}	
	
	//loop thru keys in map
	int cnt = 0;
	
	
	for(Map.Entry<String, HashSet<Object>> entry : map.entrySet())
	{
	   folderPath = entry.getKey();
	   
	   //get list of classpaths
	   folderPathClassPaths =  entry.getValue();
	   
	   //write variable
	   writer.write(IO.newline());
	   writer.write(setSyntax);
	   writer.write(new StringBuilder(" C").append(cnt).append("=").toString());
	   
	   
	   //loop thru paths
	   int printedCnt = 0;
	   
	   String line = null;
	   for(Iterator<Object> pathI = folderPathClassPaths.iterator();pathI.hasNext();)
	   {
		//limit number of entries per path
		if(printedCnt > limitPerPath)
		{
		   //increment
		   cnt++;
		   
		   writer.write(newline);
		   
		   writer.write(new StringBuilder(setSyntax).append(" C").append(cnt).append("=").toString());
		   
		   printedCnt = 0;
		   
		}
		
		
		
		
		
		line = pathI.next().toString();
		writer.write(line);
		
		printedCnt += line.length();
		
		writer.write(File.pathSeparator);
		
	   }
	   writer.write(newline);
	   writer.write(newline);
	   
	   writer.flush();
	   
	}
	
	//print classpath
	writer.write(setSyntax); writer.write(" CLASSPATH=");
	
	for(int i=0; i <cnt;i++)
	{
	   writer.write(variablePrefix+i);
	   writer.write(variableSuffix);
	   
	}
	writer.write(newline);
	writer.write(newline);
	
	
	writer.write("java <CLASS> <ARG>");


	writer.flush();
	
	writer.write(newline);
	
	writer.write("java  junit.textui.TestRunner <CLASS> <ARG>");
	writer.write(newline);
	
	writer.flush();
	
	
	//System.out.println("File.pathSeparator="+File.pathSeparator);
	//System.out.println("File.separator="+File.separator);
	
	
   }
1349841
public void writeExternal(PofWriter writer) throws IOException {
        writer.writeObject(0, expression);
        writer.writeMap(1, variables, String.class);
    }
103797
public void write(WritableByteChannel channel) throws IOException {
        logger.debug("Writing> {}", this);
        for (Field field : fields) {
            field.write(channel);
        }
    }
13617
protected final void setQWForFiles(final Writer writer) {
		final SynchronizedCountingQuietWriter countingQuietWriter = new SynchronizedCountingQuietWriter(writer, super.getErrorHandler());
		this.getProperties().setCountingQuietWriter(countingQuietWriter);
		super.qw = countingQuietWriter;
	}
1279050
public static void writeValue(JsonWriter writer, String name, String value) throws IOException {
        writer.name(name).value(value);
    }
271751
public void writeFields(ArrayList<String> fields) throws IOException {

		if (newWriter) {
			this.newWriter = false;
		} else {
			this.newLine();
		}
		Iterator<String> si = fields.iterator();
		while (si.hasNext()) {
			this.writeField(si.next());
		}
	}
1200132
public static void write(char c, Writer writer) {
        try {
            writer.write(c);
        } catch (IOException e) {
            throw E.ioException(e);
        }
    }