Best way to save data securely

Is ObjectOutputStream the best way to save data?
And does anyone have an idea for securely saving resources?

Thanks in advance!