java: ImageService: do byte[] comparison properly