Im making a simple TCP/IP Socket app
Whats the different between doing this:
DataInputStream in = new DataInputStream(clientSocket.getInputStream());
byte[] buffer = new byte[100];
in.readFully(buffer);
versus doing this:
DataInputStream in = new DataInputStream(clientSocket.getInputStream());
byte[] buffer = new byte[100];
in.read(buffer);
I had a look at the documentation, they have the same exact description. readFully()
and read()
So can I assume its the same thing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…