mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-16 10:03:14 -07:00
fixing up data store stuff
This commit is contained in:
parent
5c2aaad365
commit
6e998efd15
3 changed files with 9 additions and 6 deletions
|
@ -6,25 +6,28 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
public class AndroidFileProvider implements DataStoreFileProvider {
|
||||
private static final String TAG = "AndroidFileProvider";
|
||||
|
||||
Context _ctx;
|
||||
|
||||
AndroidFileProvider(Context ctx) {
|
||||
public AndroidFileProvider(Context ctx) {
|
||||
this._ctx = ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileInputStream getInputFileStream(String name)
|
||||
throws FileNotFoundException {
|
||||
// TODO Auto-generated method stub
|
||||
Log.d(TAG, "Returning FileInputStream for: " + name);
|
||||
return _ctx.openFileInput(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileOutputStream getOutputFileStream(String name)
|
||||
throws FileNotFoundException {
|
||||
// TODO Auto-generated method stub
|
||||
Log.d(TAG, "Returning FileOutputStream for: " + name);
|
||||
return _ctx.openFileOutput(name, Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue