且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何presist的登录凭据并做自动登录Android中

更新时间:2023-12-04 17:45:04

您可以流多个对象相同的文件

You can stream multiple objects to the same file

FileOutputStream fStream = openFileOutput(namefile.bin, Context.MODE_PRIVATE) ;
ObjectOutputStream oStream = new ObjectOutputStream(fStream);
oStream.writeObject(Username) ;
oStream.writeObject(Password) ;
oStream.flush() ;
oStream.close() ;