From 3c4c2518e8354357ed237b46d4d628f60b49640d Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Tue, 11 Nov 2014 14:29:44 +0000 Subject: [PATCH] Better BOM docs. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1638121 13f79535-47bb-0310-9956-ffa450edef68 --- src/site/xdoc/user-guide.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/site/xdoc/user-guide.xml b/src/site/xdoc/user-guide.xml index 6a88ec6f..99273a4c 100644 --- a/src/site/xdoc/user-guide.xml +++ b/src/site/xdoc/user-guide.xml @@ -49,6 +49,15 @@ try { } finally { parser.close(); reader.close(); +} +

+ You might find it handy to create something like this: +

+ /** + * Creates a reader capable of handling BOMs. + */ +public InputStreamReader newReader(final InputStream inputStream) { + return new InputStreamReader(new BOMInputStream(inputStream), StandardCharsets.UTF_8); }