public class DataOutputStreamDemo extends java.lang.Object
DataOutputStream.| Constructor and Description |
|---|
DataOutputStreamDemo()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createData(byte[] message)
Uses the IAIK-CMS DataOutputStream class to encode the given data.
|
byte[] |
getData(byte[] data)
Parses a CMS
Data object. |
static void |
main(java.lang.String[] argv)
Main method.
|
void |
start()
Starts the tests.
|
public DataOutputStreamDemo() throws java.io.IOException
java.io.IOExceptionpublic byte[] createData(byte[] message) throws iaik.cms.CMSException, java.io.IOException
message - the message to be encoded, as byte representationData object just created,
wrapped in a ContentInfoiaik.cms.CMSException - if the Data object cannot
be createdjava.io.IOException - if an I/O error occurspublic byte[] getData(byte[] data) throws iaik.cms.CMSException, java.io.IOException
Data object.data - the Data object as BER encoded byte arrayiaik.cms.CMSException - if an parsing exception occursjava.io.IOException - if an I/O error occurspublic void start()
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception