I am trying read UTF-16 encoded file in JDK 7, can anyone help me out. I can able to read in Python by:
fread = open(r'sample.dat', 'rb').read()
mytext = fread.decode('utf-16')
print mytext
I tried so many ways in java 7 but not succeeded. Thanks in advance.