try {
ZipArchive archive = getZipArchive();
InputStream stream = archive.getInputFrom(filename);
Object object = null;
if (stream != null) {
BinaryContentInput content = new BinaryContentInput(stream);
JiBXReader jibxReader = new JiBXReader(expectedClass,
schemaValidation ? deviceSchemaValidator : null);
object = jibxReader.read(content, filename);
}
return object;