fixed NegativeArrayException in DiskBasedCache class

I caught NegativeArrayException in DiskBasedCache class