-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_8
checked in build 89 and PIT build 338.
This method returns the number of bytes transfered , but the method return type is int. So when the number of bytes transfered is greater than 2^31-1 , it
gives an exception :
"java.io.IOException: Value too large for defined data type"
public abstract int transferTo(long position,
long count,
WritableByteChannel target)
throws IOException
The testcase transferTo1.java is attached.
The similar problem is there for transferFrom method :
public abstract int transferFrom(ReadableByteChannel src,
long position,
long count)
throws IOException
the method returns an int value.
This method returns the number of bytes transfered , but the method return type is int. So when the number of bytes transfered is greater than 2^31-1 , it
gives an exception :
"java.io.IOException: Value too large for defined data type"
public abstract int transferTo(long position,
long count,
WritableByteChannel target)
throws IOException
The testcase transferTo1.java is attached.
The similar problem is there for transferFrom method :
public abstract int transferFrom(ReadableByteChannel src,
long position,
long count)
throws IOException
the method returns an int value.