CHanged to BufferedInputStream from BufferedReader in Database class