Re: Beginner CSV error
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2006 22:19:43 GMT
On 30 Jan 2006 12:17:13 -0800, "Rob" <rstupplebeen@xxxxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :
>unreported exception java.io.FileNotFoundException; must be caught or
>declared to be thrown
>
>String[][] data = (new CSVParser(new
>FileReader("test.csv"))).getAllValues();
>Note: .\com\Ostermiller\util\CSVParser.java uses unchecked or unsafe
>operations.
Your FileReader could blow up with a FileNotFoundException. You need
to to catch that or at least put a throws on main to let Java deal
with it.
His code was written to work prior to JDK 1.5, thus Javac will
complain about it not using 1.5 generics. It is nothing to worry
about.
you could modify his code to generify it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- Follow-Ups:
- Re: Beginner CSV error
- From: Rob
- Re: Beginner CSV error
- References:
- Beginner CSV error
- From: Rob
- Beginner CSV error
- Prev by Date: Re: Beginner CSV error
- Next by Date: Re: sorry .09 instead of .08
- Previous by thread: Re: Beginner CSV error
- Next by thread: Re: Beginner CSV error
- Index(es):
Relevant Pages
|