|
J avolution v5.4 (J2SE 1.6+) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavolution.io.Struct.Member
protected class Struct.Member
This inner class represents the base class for all Struct
members. It allows applications to define additional member types.
For example:
public class MyStruct extends Struct {
BitSet bits = new BitSet(256);
...
public BitSet extends Member {
public BitSet(int nbrBits) {
super(1, (nbrBits+7)>>3);
}
public boolean get(int i) { ... }
public void set(int i, boolean value) { ...}
}
}
Constructor Summary | |
---|---|
protected |
Struct.Member(int alignment,
int bitSize)
Base constructor for custom member types. |
Method Summary | |
---|---|
int |
bitOffset()
Returns the bit offset of this member in its struct. |
int |
bitSize()
Returns the number of bits in this member |
Struct |
struct()
Returns the outer struct container. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Struct.Member(int alignment, int bitSize)
alignment
- the desired alignment in bytes or 0
if no alignment to be performed (e.g. bit fields).bitSize
- the size of this member in bytes.Method Detail |
---|
public final Struct struct()
struct
container.
public final int bitSize()
public final int bitOffset()
|
J avolution v5.4 (J2SE 1.6+) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |