List of usage examples for org.apache.commons.vfs.util UserAuthenticatorUtils toChar
public static char[] toChar(String string)
From source file:org.jclouds.vfs.provider.blobstore.BlobStoreFileProvider.java
protected FileSystem doCreateFileSystem(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { BlobStoreFileName rootName = (BlobStoreFileName) name; UserAuthenticationData authData = null; BlobStoreContext context;//from w w w .j av a 2 s. co m try { String uriToParse = rootName.getFriendlyURI(); authData = UserAuthenticatorUtils.authenticate(fileSystemOptions, AUTHENTICATOR_TYPES); URI location = HttpUtils.createUri(uriToParse); context = new BlobStoreContextFactory().createContext(location.getHost(), UserAuthenticatorUtils .toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.USERNAME, UserAuthenticatorUtils.toChar(rootName.getUserName()))), UserAuthenticatorUtils .toString(UserAuthenticatorUtils.getData(authData, UserAuthenticationData.PASSWORD, UserAuthenticatorUtils.toChar(rootName.getPassword()))), modules, new Properties()); } finally { UserAuthenticatorUtils.cleanup(authData); } return new BlobStoreFileSystem(rootName, context, fileSystemOptions); }