|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openadaptor.security.Footer
public class Footer
Footer class represent any fooer information appended to the data packet by a Security Agent Information is stored in "properties"; name/value pairs. The name is a string, like "signature" and the value must be a byte array. Footers can have any number of properties, including none. Footers know how to write themselves out and read themselves back in.
Field Summary | |
---|---|
protected static int |
NO_ID
indicates that _idValue has not been assigned a value yet. |
Constructor Summary | |
---|---|
Footer()
Default constructor |
|
Footer(int idValue)
Constructor providing a predefined identifier value. |
Method Summary | |
---|---|
protected boolean |
byteArrayEquals(byte[] b1,
byte[] b2)
Returns true iff both byte arrays contain identical byte sequences. |
boolean |
equals(java.lang.Object obj)
Implements equals() operation for Footer objects |
void |
fromInputStream(java.io.InputStream is)
Reads and populates the Footer from the InputStream. |
protected int |
getIdentifierValue()
Returns the identifier value for the footer. |
byte[] |
getProperty(java.lang.String name)
|
void |
setProperty(java.lang.String name,
byte[] data)
|
void |
toOutputStream(java.io.OutputStream os)
Writes out the footer to an OutputStream. |
java.lang.String |
toString()
Create string representation of Footer, for debugging or diagnostics. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int NO_ID
Constructor Detail |
---|
public Footer()
public Footer(int idValue)
idValue
- Method Detail |
---|
public void setProperty(java.lang.String name, byte[] data)
public byte[] getProperty(java.lang.String name)
protected int getIdentifierValue()
public void toOutputStream(java.io.OutputStream os) throws java.io.IOException
Footer contains: signature=[00, 01, 02, 03]; Encoded as: \23\0\0\0signature\0\4\0\0\0\0\1\2\3\0Note - current implementation could be optimised; it creates a ByteArrayOutputStream for each call.
os
- output stream
java.io.IOException
public void fromInputStream(java.io.InputStream is) throws java.io.IOException
is
- InputStream from which to read Footer details.
java.io.IOException
- If there are problems reading from InputStream.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Comparison object.
public java.lang.String toString()
toString
in class java.lang.Object
protected boolean byteArrayEquals(byte[] b1, byte[] b2)
b1
- first byte array.b2
- first byte array.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |