Skip to content

Commit 208f7f4

Browse files
committed
don't write a BOM on every (or any) line
1 parent c19b6af commit 208f7f4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/org/apache/commons/io/IOUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3828,12 +3828,16 @@ public static void writeLines(final Collection<?> lines, final String lineEnding
38283828
* Writes the {@link #toString()} value of each item in a collection to
38293829
* an {@link OutputStream} line by line, using the specified character
38303830
* encoding and the specified line ending.
3831+
*
3832+
* UTF-16 is written big-endian with no byte order mark.
3833+
* For little endian, use UTF-16LE. For a BOM, write it to the stream
3834+
* before calling this method.
38313835
*
38323836
* @param lines the lines to write, null entries produce blank lines
38333837
* @param lineEnding the line separator to use, null is system default
38343838
* @param output the {@link OutputStream} to write to, not null, not closed
38353839
* @param charset the charset to use, null means platform default
3836-
* @throws NullPointerException if the output is null
3840+
* @throws NullPointerException if output is null
38373841
* @throws IOException if an I/O error occurs
38383842
* @since 2.3
38393843
*/

0 commit comments

Comments
 (0)