If you are tracking OpenJDK (assuming you have a network connection), you get SocketInputStream.skip(long)
public long skip(long numbytes) throws IOException { if (numbytes <= 0) { return 0; } long n = numbytes; int buflen = (int) Math.min(1024, n); byte data[] = new byte[buflen]; while (n > 0) { int r = read(data, 0, (int) Math.min((long) buflen, n)); if (r < 0) { break; } n -= r; } return numbytes - n; }
It seems that all the data is read before the connection is closed (or you read 9 Exa-bytes;)
EDIT: The maximum read size of 1024 bytes is a bit surprising if 1.5K packets are pretty common (when sending a lot of data).
source share