Trying to access different modes of data through java