Changed BufferedInputStream into DataInputStream