public interface ObjectStorage
Modifier and Type | Method and Description |
---|---|
void |
clearObject(Serializable object)
清除某个对象
|
void |
clearObjects()
清除所有对象,会清除子目录
|
void |
clearObjects(String typeName)
清除某种类型所有对象
|
String |
getRootFolder()
返回文件根路径
|
List<Serializable> |
loadObjects()
载入所有对象
|
<T> List<T> |
loadObjects(String typeName)
载入指定类型的对象
|
void |
saveObject(Serializable object)
保存普通对象
|
void |
saveObject(Serializable object,
String typeName)
存储某种类型的文件
|
String getRootFolder()
List<Serializable> loadObjects() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
<T> List<T> loadObjects(String typeName) throws IOException, ClassNotFoundException
T
- typeName
- IOException
ClassNotFoundException
void saveObject(Serializable object) throws IOException
object
- IOException
void saveObject(Serializable object, String typeName) throws IOException
object
- typeName
- IOException
void clearObject(Serializable object) throws IOException
object
- IOException
void clearObjects() throws IOException
IOException
void clearObjects(String typeName) throws IOException
typeName
- IOException
Copyright © 2006–2018 TinyGroup. All rights reserved.