Since there is only one InputStream
used its no longer possible to read from the closed input source the second time the method is called
Either refrain from closing the Scanner
(or create a single class instance of Scanner
to be closed at application end)