simplify get HdfsInputStream logic in HdfsFileInputStream

simplify get HdfsInputStream logic in HdfsFileInputStream, add to functions to replace reused code.