chrism...@gmail.com wrote:
The skip() method appears to be broken in the Java 1.5.05 JVM for
kernel 2.6.9 of Linux (32-bit) when you pass in a value larger than
Integer.MAX_VALUE. I keep getting an "IOException: Invalid Argument"
when trying to skip more than Integer.MAX_VALUE bytes in a file larger
than Integer.MAX_VALUE.
..
Does anyone know of a workaround or fix for this?
I note you had found a work-around for the current
installation, by changing the FS. Assuming the FS
were not open for adjustment to this apps. needs,
I was wondering if this simple little hack might work.
.
long target = Integer.MAX_VALUE*5l + 7l;
while ( target>Integer.MAX_VALUE ) {
fis.skip( Integer.MAX_VALUE );
target -= Integer.MAX_VALUE;
}
fis.skip( target );
.
A test by the OP under the original conditions would
be interesting, but I am also interested in hearing
theoretical comments.
--
Andrew Thompsonhttp://www.athompson.info/andrew/
Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200709/1
I had already tried that and it didn't work. The second you exceed