A compact fast performing Java class SecureString enables long-term storage of sensitive strings that is resilient against a privileged insider, i.e. makes it hard to introspect its content from a memory dump.
Click the home page link for a white paper with details and discussion on the subject of in-memory storage of sensitive data in Java.