Java binarizer