public abstract class DisBitSet extends java.util.BitSet implements Marshaller
BitSet
. That class exports its
byte array contents in little-endian order (least significant byte first). The DIS spec requires
the opposite, which is the default for "network byte order".Constructor and Description |
---|
DisBitSet(int len) |
Modifier and Type | Method and Description |
---|---|
protected static int |
calculateMask(int length) |
protected static int |
calculateMask(int position,
int length) |
int |
getMarshalledSize() |
void |
marshal(java.nio.ByteBuffer buff)
Packs a Pdu into the ByteBuffer.
|
void |
marshal(java.io.DataOutputStream dos) |
byte[] |
marshallCommon() |
protected void |
setbits(int pos,
int len,
int val) |
int |
unmarshal(java.nio.ByteBuffer buff)
Unpacks a Pdu from the underlying data.
|
int |
unmarshal(java.io.DataInputStream dis) |
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf, xor
protected static int calculateMask(int position, int length)
protected static int calculateMask(int length)
protected void setbits(int pos, int len, int val)
public int getMarshalledSize()
getMarshalledSize
in interface Marshaller
public void marshal(java.io.DataOutputStream dos)
marshal
in interface Marshaller
public void marshal(java.nio.ByteBuffer buff)
Marshaller
marshal
in interface Marshaller
buff
- The ByteBuffer at the position to begin writingByteBuffer
public byte[] marshallCommon()
public int unmarshal(java.io.DataInputStream dis)
unmarshal
in interface Marshaller
public int unmarshal(java.nio.ByteBuffer buff)
Marshaller
unmarshal
in interface Marshaller
buff
- The ByteBuffer at the position to begin readingByteBuffer