public class FileDataStoreFactory extends AbstractDataStoreFactory
For security purposes, the file's permissions are set such that the file is only accessible by the file's owner.
Note: this class is not compatible with Android lower than API level 26 (Oreo). For an implementation compatible with Android < 26, please use com.google.api.client.extensions.android.util.store.FileDataStoreFactory which is provided by com.google.http-client:google-http-client-android.
| Constructor and Description |
|---|
FileDataStoreFactory(File dataDirectory) |
| Modifier and Type | Method and Description |
|---|---|
protected <V extends Serializable> |
createDataStore(String id)
Returns a new instance of a type-specific data store based on the given unique ID.
|
File |
getDataDirectory()
Returns the data directory.
|
getDataStorepublic FileDataStoreFactory(File dataDirectory) throws IOException
dataDirectory - data directoryIOExceptionpublic final File getDataDirectory()
protected <V extends Serializable> DataStore<V> createDataStore(String id) throws IOException
AbstractDataStoreFactoryThe DataStore.getId() must match the id parameter from this method.
createDataStore in class AbstractDataStoreFactoryV - serializable type of the mapped valueid - unique ID to refer to typed data storeIOExceptionCopyright © 2011–2025 Google. All rights reserved.