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
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