如何从文件中读取对象列表

时间:2021-06-05 22:40:51

标签: android android-studio kotlin bufferedreader

我有MutableLiveData<MutableList<Clients>>。我需要从/向文本文件读/写我的列表。写作一切都很好,但我想不出如何阅读对象列表。因为我的列表属于 MutableList<Clients> 类型,而我只能读取 List<String> 类型的文件。非常感谢您的帮助。

我的对象文件格式如下:

<块引用>

客户(id=1,name=Andrey,secondName=Yeroshenko,thirdName=Ivanovich,address=ul Ya.Kolasa 21-76,creditCard=3456-3467-2347-2323,bankNum=K24J32KJ2LKLJR) 客户(id=2,name=Andrey,secondName=Yeroshenko,thirdName=Ivanovich,address=ul Ya.Kolasa 21-76,creditCard=3456-3467-2347-2323,bankNum=K24J32KJ2LKLJR)

等等。

0 个答案:

没有答案
相关问题