Актуальная реализация SocketInputStream дает ответ:
public long skip(long numbytes) throws IOException {
if (numbytes <= 0) {
return 0;
}
...
}
РЕДАКТИРОВАТЬ: Извините, я проверил неправильный класс FileInputStream
s реализация является нативной, это реализация в openjdk7
if ((cur = IO_Lseek(fd, (jlong)0, (jint)SEEK_CUR)) == -1) {
JNU_ThrowIOExceptionWithLastError(env, "Seek error");
} else if ((end = IO_Lseek(fd, toSkip, (jint)SEEK_CUR)) == -1) {
JNU_ThrowIOExceptionWithLastError(env, "Seek error");
}
return (end - cur);