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
IOExceptionClassNotFoundException<T> List<T> loadObjects(String typeName) throws IOException, ClassNotFoundException
T - typeName - IOExceptionClassNotFoundExceptionvoid saveObject(Serializable object) throws IOException
object - IOExceptionvoid saveObject(Serializable object, String typeName) throws IOException
object - typeName - IOExceptionvoid clearObject(Serializable object) throws IOException
object - IOExceptionvoid clearObjects()
throws IOException
IOExceptionvoid clearObjects(String typeName) throws IOException
typeName - IOExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.