|
-
Oct 30th, 2007, 06:16 PM
#1
Thread Starter
Hyperactive Member
Data input stream has been deprecated
Code:
// String for line input
String iLine="";
// Begin While loop, loop it up
while (in.available() !=0) {
// grab line from file and place into temp storage
iLine = in.readLine();
model.addElement(iLine);
} // end while
iLine = in.readLine(); is giving a data input deprecated warning, how do I fix it? Im not getting any blank lines, I want those blank lines.
Thanks
-
Oct 31st, 2007, 01:20 AM
#2
Re: Data input stream has been deprecated
This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method.
But if you want to use the deprecated method anyway you can just note your method with @Deprecated so the compiler allows it
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|