simplify DataInputStream.read