Close the DataInputStream after it is done reading the into the buffer.

Around line 233 the DataInputStream was not closed.