simplify get HdfsInputStream logic in HdfsFileInputStream

simplify get HdfsInputStream logic in HdfsFileInputStream, add two functions to replace reused code.
Seems this logic is the opposite of the previous logic.