Interface PacketReaderService
-
- All Known Implementing Classes:
PacketReaderServiceImpl
public interface PacketReaderServiceThe Interface PacketReaderService.- Author:
- Sowmya
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckFileExistence(String id, String fileName, String source)Check file existence.ObjectgetCompleteIdObject(String rid, String sourcepackets)Get the complete idObjectInputStreamgetEncryptedSourcePacket(String rid, InputStream inputStream, String source)Get the encrypted source packet from the parent zipInputStreamgetFile(String id, String fileName, String source)Gets the file.DoublegetIdSchemaVersionFromPacket(String rid)Get the schema version from inside default packet
-
-
-
Method Detail
-
checkFileExistence
boolean checkFileExistence(String id, String fileName, String source) throws PacketDecryptionFailureException, IOException, ApiNotAccessibleException
Check file existence.- Parameters:
id- the idfileName- the file namesource- the source- Returns:
- true, if successful
- Throws:
PacketDecryptionFailureException- the packet decryption failure exceptionIOException- Signals that an I/O exception has occurred.ApiNotAccessibleException
-
getFile
InputStream getFile(String id, String fileName, String source) throws IOException, PacketDecryptionFailureException, IOException, ApiNotAccessibleException
Gets the file.- Parameters:
id- the idfileName- the file namesource- the source- Returns:
- the file
- Throws:
IOException- Signals that an I/O exception has occurred.IOException- Signals that an I/O exception has occurred.PacketDecryptionFailureException- the packet decryption failure exceptionIOExceptionApiNotAccessibleException
-
getEncryptedSourcePacket
InputStream getEncryptedSourcePacket(String rid, InputStream inputStream, String source) throws IOException
Get the encrypted source packet from the parent zip- Parameters:
rid- : The ridinputStream- : parent zip input streamsource- : the source (EX - id, evidence, optional)- Returns:
- : source zip
- Throws:
IOException
-
getCompleteIdObject
Object getCompleteIdObject(String rid, String sourcepackets) throws PacketDecryptionFailureException, ApiNotAccessibleException, IOException
Get the complete idObject- Parameters:
rid- : The rid- Throws:
IOExceptionApiNotAccessibleExceptionPacketDecryptionFailureException
-
getIdSchemaVersionFromPacket
Double getIdSchemaVersionFromPacket(String rid) throws PacketDecryptionFailureException, ApiNotAccessibleException, IOException
Get the schema version from inside default packet- Parameters:
rid- : registration id to get default packet- Returns:
- : schema version
- Throws:
PacketDecryptionFailureExceptionApiNotAccessibleExceptionIOException
-
-