Why these methods return int 0 or 1?
Why do they swallow exceptions?