Per spec:
size - The size of the region to be mapped; must be non-negative
However,
fc.map(FileChannel.MAP_RO, 0, 0) throws IOException.
Implementation seems correct, and spec should say:
size - The size of the region to be mapped; must be greater than 0.
------- results ------------
On Solaris:
==========
java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:386)
On Windows NT:
=============
java.io.IOException: The volume for a file has been externally altered such that the opened file is no longer valid
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:386)
-----------------
Merlin Beta B-65
size - The size of the region to be mapped; must be non-negative
However,
fc.map(FileChannel.MAP_RO, 0, 0) throws IOException.
Implementation seems correct, and spec should say:
size - The size of the region to be mapped; must be greater than 0.
------- results ------------
On Solaris:
==========
java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:386)
On Windows NT:
=============
java.io.IOException: The volume for a file has been externally altered such that the opened file is no longer valid
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:386)
-----------------
Merlin Beta B-65