public class ConverterArchive extends Object
| Constructor | Description |
|---|---|
ConverterArchive() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
closeArchiveforInsert() |
|
void |
closeArchiveforRead() |
|
void |
insertObj(Object obj,
String entryName) |
entryName is the name of the obj inside the zip file, include directory
|
void |
insertObjtoFile(String directory,
String filename,
Object obj) |
|
void |
insertSingleObj(String zipName,
Object obj,
String entryName) |
entryName is the name of the obj inside the zip file, include directory
zipName is the name of the zip file.
|
void |
openArchiveforInsert(String zipName) |
|
void |
openArchiveforRead() |
|
Object |
readObj(String entryName) |
Deserializes an Object from a resource located by
Class.getResource(String), using a JVM wide filter, if any. |
Object |
readObj(String entryName,
ObjectInputFilter filter) |
Deserializes an Object from a resource located by
Class.getResource(String), using the given filter. |
Object |
readObj(String zipName,
String entryName) |
Deserializes an Object from a zip file using a JVM wide filter, if any.
|
public void openArchiveforInsert(String zipName)
zipName - is the name of the zip file. May include directorypublic void closeArchiveforInsert()
public void insertObj(Object obj, String entryName)
public void insertSingleObj(String zipName, Object obj, String entryName) throws IOException
IOExceptionpublic void insertObjtoFile(String directory, String filename, Object obj) throws IOException
IOExceptionpublic void openArchiveforRead()
public void closeArchiveforRead()
public Object readObj(String entryName)
Class.getResource(String), using a JVM wide filter, if any.
Warning: Deserialization of untrusted data is inherently dangerous
and should be avoided. Untrusted data should be carefully validated according to the
"Serialization and Deserialization" section of the
Secure Coding Guidelines for Java SE
.
Parameters:
Warning: Deserialization of untrusted data is inherently dangerous
and should be avoided. Untrusted data should be carefully validated according to the
"Serialization and Deserialization" section of the
Secure Coding Guidelines for Java SE
.
Parameters:
entryName - Resource name. Not null.
readObj
public Object readObj(String entryName,
ObjectInputFilter filter)
Class.getResource(String), using the given filter.
entryName - Resource name. Not null.filter - Filter for deserialized objects. May be null.
readObj
public Object readObj(String zipName,
String entryName)
zipName - is the name of the zip file. May include directory. Not
null.entryName - the name of the obj inside the zip file, include
directory. Not null.