/** * Writes the contents of the supplied CharWrapVector to the specified writer, * closing the writer on completion or error. * * @param source * The CharWrapVector to be written * @param dest * The writer where the input data is to be copied. * @exception IOException * if an I/O error occurs. */ public static final void charWrapVectorToWriter(CharWrapVector source, Writer dest) throws IOException { for (int i = 0; i < source.size(); ++i) { CharWrap wrap = source.charWrapAt(i); dest.write(wrap.storage, wrap.offset, wrap.size); } }