Make CMS running without data area, and remove unnecessary dependencies.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / security / AbstractKeyring.java
index 10b583fdfa6b9e5eba23c91fe8b052a1dd96c294..3de2e1451d89a5a7b5cafb16d2cbe54194d2e2aa 100644 (file)
@@ -24,9 +24,9 @@ import javax.security.auth.callback.UnsupportedCallbackException;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 
-import org.apache.commons.io.IOUtils;
 import org.argeo.api.cms.CmsAuth;
 import org.argeo.util.CurrentSubject;
+import org.argeo.util.StreamUtils;
 
 /** username / password based keyring. TODO internationalize */
 public abstract class AbstractKeyring implements Keyring, CryptoKeyring {
@@ -109,7 +109,7 @@ public abstract class AbstractKeyring implements Keyring, CryptoKeyring {
                try (InputStream in = getAsStream(path);
                                CharArrayWriter writer = new CharArrayWriter();
                                Reader reader = new InputStreamReader(in, charset);) {
-                       IOUtils.copy(reader, writer);
+                       StreamUtils.copy(reader, writer);
                        return writer.toCharArray();
                } catch (IOException e) {
                        throw new IllegalStateException("Cannot decrypt to char array", e);