On Tue, Nov 11, 2014 at 10:02 AM, Benedikt Ritter <brit...@apache.org> wrote:
> 2014-11-11 15:29 GMT+01:00 <ggreg...@apache.org>: > > > Author: ggregory > > Date: Tue Nov 11 14:29:44 2014 > > New Revision: 1638121 > > > > URL: http://svn.apache.org/r1638121 > > Log: > > Better BOM docs. > > > > Modified: > > commons/proper/csv/trunk/src/site/xdoc/user-guide.xml > > > > Modified: commons/proper/csv/trunk/src/site/xdoc/user-guide.xml > > URL: > > > http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/site/xdoc/user-guide.xml?rev=1638121&r1=1638120&r2=1638121&view=diff > > > > > ============================================================================== > > --- commons/proper/csv/trunk/src/site/xdoc/user-guide.xml (original) > > +++ commons/proper/csv/trunk/src/site/xdoc/user-guide.xml Tue Nov 11 > > 14:29:44 2014 > > @@ -50,6 +50,15 @@ try { > > parser.close(); > > reader.close(); > > }</source> > > + <p> > > + You might find it handy to create something like this: > > + </p> > > + <source>/** > > + * Creates a reader capable of handling BOMs. > > + */ > > +public InputStreamReader newReader(final InputStream inputStream) { > > + return new InputStreamReader(new BOMInputStream(inputStream), > > StandardCharsets.UTF_8); > > > > StandardCharsets is Java 7, but csv is Java 6 :-( > Indeed, but this is an example only. Gary > > > > +}</source> > > </section> > > <section name="Printing with headers"> > > <p> > > > > > > > > > -- > http://people.apache.org/~britter/ > http://www.systemoutprintln.de/ > http://twitter.com/BenediktRitter > http://github.com/britter > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory