aefo/encfs-java — comment on commit bfb766d1c81d027cb4c037e7b75e586e9db90638
File:  line 0
By mrpdaemon:

So, this is a bit problematic - the reason why I've omitted read(byte[], int, int) from EncFSFileInputStream is that for some reason on Android this leads to an infinite loop, what happens is:

EncFSFileInputStream.readBlock() ->
FileInputStream.read(byte[], int, int) ->
EncFSFileInputStream.read(byte[], int, int) -> (uses the overloaded implementation of read)
EncFSFileInputStream.readBlock() === Infinite loop

The weird thing is that it works fine with Sun JDK, ie. no infinite loop, but under the Android VM that is the behavior. I don't understand Java Inheritance well enough to understand why there is such a difference. Any ideas?