sure I'm having a brain fart but the code snippet below always generates an
IOException(read error). The file and and permissions are ok. It reads the
first line writes the new file then generates the exception. I'd appreciate
any help.
Joel McCarty
--------------------------------------------------------------------
try{
DataInputStream dis2 = new DataInputStream(new
FileInputStream(args[1]));
PrintStream ps = new PrintStream(new
FileOutputStream("./548data.txt"));
int pos = Integer.parseInt(args[0]); //cast arg[0] to int
pos -= 1; //convert from 1-n to 0-n range for
substring op
while ((dataLine = dis2.readLine()) != null){
for (int n=0;n<ssnArray.length;++n){
if (ssnArray[n].equals (dataLine.substring(pos, 9))){
ps.println(dataLine);
}
}
dis2.close();
ps.close();
}
--------------------------------------------------------------------------------
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]