You're "reading" file wrong. Read an IO tutorial such as this one.
You're not closing your resources properly.
The array might not have a size of 2 because it gets reassigned on line 9. Try printing the size of it before you use it.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
At line 7 reader.toString() will invoke java Object's toString() and it won't give you file contents.
Hence, s.split("/") will always give you zero length string.
You need to go through the tutorial mentioned by Wouter and read file properly.