error in java version detected (c is identical) + c implemention other wise complete but not optimised (and misses blksize reading)

Signed-off-by: Mattias Andrée <maandree@operamail.com>