Expand|Select|Wrap|Line Numbers
- static int NumberofLines(String file) throws IOException{
- RandomAccessFile reader = null;
- int lineCount = 0;
- try {
- reader = new RandomAccessFile(file + "/perso.txt", "r");
- for (String line = reader.readLine(); line != null;
- line = reader.readLine()) {
- lineCount++;
- }
- } catch (IOException e) {
- System.err.format("Could not read %s: %s%n", file, e);
- System.exit(1);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException e) {}
- }
- }
- System.out.println("Number of Lines are " + lineCount);
- return lineCount;
- }
Could not read \\10.10.0.127\c$\Documents and Settings\oshonowo\My Documents\Chams to be burnt
FIDELITY_ChamsFiles_200711281004: java.io.FileNotFoundException: \\10.10.0.127\c$\Documents and Settings\oshonowo\My Documents\Chams to be burnt
FIDELITY_ChamsFiles_200711281004\perso.txt (The filename, directory name, or volume label syntax is incorrect)
Java Result: 1
I have shared the folder oshonowo on the 10.10.0.127 machine.
Pls help