Some utils in Java