Some utils in java