|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.novell.service.bindery.BinderyPropertyDataSegment
Holds a 128-byte data segment containing the data of a Bindery Property. It is used as an Attribute Value attached to the Bindery Properties attribute.
This class is immutable, which means once it is created it cannot be changed (except for adding more data segments). To make modifications, extract the data not to be changed, create a new object with the old object, and add the new data.
Field Summary | |
static int |
SEGMENT_LENGTH
The official length of a data segment in the bindery. |
Constructor Summary | |
BinderyPropertyDataSegment(byte[] seg,
int segNum,
int segFlag)
Constructs a property data segment from a byte array. |
|
BinderyPropertyDataSegment(java.util.Vector vseg,
int segNum,
int segFlag)
Construct a property data segment from a vector of integers. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares the set data passed in the Object parameter with the current segment. |
byte[] |
getByteData()
Returns a byte array from which a new property data segment can be created. |
int |
getSegFlag()
Returns the data segment property flag. |
int |
getSegNum()
Returns the number of this data segment. |
java.util.Vector |
getSetData()
Returns a set of bindery IDs. |
boolean |
isSet()
Determines if this data segment contains Set data. |
java.lang.String |
toString()
Returns a string representation of this bindery segment. |
Methods inherited from class java.lang.Object |
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int SEGMENT_LENGTH
(SEGMENT_LENGTH = 128)
Constructor Detail |
public BinderyPropertyDataSegment(byte[] seg, int segNum, int segFlag) throws com.novell.service.jncp.NSIException
seg
- The byte array. If this array is less than 128,
the remainder of the segment is 0 padded.segNum
- The number of this segment (1 based).segFlag
- The property flag (BF_ITEM, BF_SET), which should
match the property type.public BinderyPropertyDataSegment(java.util.Vector vseg, int segNum, int segFlag)
vseg
- A vector of integers to be put into the data
segment. If the vector contains more than 32
entries, the remaining entries are ignored.
If the vector contains fewer than 32 entries
the remainder of the segment is 0 padded.segNum
- The number of this segment (1 based).segFlag
- The property flag (BF_ITEM, BF_SET),which should
match the property type.Method Detail |
public byte[] getByteData()
public int getSegNum()
public int getSegFlag()
public boolean isSet()
public java.util.Vector getSetData()
public boolean equals(java.lang.Object obj)
If the 2 segments are Set data, then equality is determined by finding all the IDs in the parameter that match the current segment, regardless of order or extra IDs. This is done so that you can search for a single ID in properties that have many. If the two segments are not Set data, every byte in the segment must be identical.
obj
- The Object with which to compare the current segment.public java.lang.String toString()
Bindery segment data does not lend itself to becoming a string because its format is ill-defined. The only known definition is IF it is Set data, in which each 4 bytes are the ID of another bindery object. If it is not Set data the segment can be anything. This toString() method checks to see if anything falls into the pattern of a c-string and displays it that way if possible. If not, a string of bytes in hex format is output.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |