"I was born in a water moon..."
The Algebraist by Iain M. Banks
Simon Hunt wrote:
I've tried editing the Path but nothing seems to work, even though I can see the file within the .jar using winzip.
"I was born in a water moon..."
The Algebraist by Iain M. Banks
Simon Hunt wrote:
2. getResourceAsStream(String name) returns an InputStream object which doesn't have a readLine() method which I need to parse my csv file.
My problem seems to be that ultimately I need a File object to pass to my FileReader to pass to my BufferedReader for that.
I'm saying I don't know how to parse it if the BufferedReader class isn't available. I'm sure that there are plenty of other ways of parsing a file I don't know about. During my scouring of the API I found a bunch of bit-wise methods in the getResourceAsStream section, so I know that's possible to do it bit-wise, but that seems a crazy way to tackle a .csv file; the readLine() method gives me a line at a time as a string which I know how to manipulate satisfactorily.Henry Wong wrote: First of all, why do you absolutely need the readLine() method? Are you saying that you can't parse it, if the BufferedReader class isn't available?
I'm really not asserting anything. It just appears from the section of the book and the code examples that a BufferedReader takes a FileReader as a constructor argument.Henry Wong wrote:Second, why do you need a FileReader ? Are you saying that you can't get a BufferedReader without a FileReader ?
"I was born in a water moon..."
The Algebraist by Iain M. Banks
Simon Hunt wrote:
Henry - it seems from your tone that you're finding this exchange irritating, for which I apologise, but the reason I'm posting to this forum is that I'm very much a Java beginner despite having joined this forum some years ago. I'm a hobbyist programmer, and I only usually get to programming about once a year, and it usually involves me largely re-learning Java from scratch (I use "Head First Java" mainly because it's fun).
Henry Wong wrote:Nope. No irritation whatsoever. It is just a bunch of hints phrased in a form of a question. Pretty common technique for me.... And trust me, it takes a *LOT* of effort to get me irritated....
"I was born in a water moon..."
The Algebraist by Iain M. Banks
Don't get me started about those stupid light bulbs. |