|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.io.ArrayMask
public class ArrayMask
Used to keep track of which entries in an array are null and which are not. Note: only arrays up to 262,144 elements in length can be handled by this class.
| Field Summary | |
|---|---|
protected byte[] |
_mask
A byte array with bits for every entry in the source array. |
| Constructor Summary | |
|---|---|
ArrayMask()
Creates an array mask suitable for unserializing. |
|
ArrayMask(int length)
Creates an array mask for an array of the specified length. |
|
| Method Summary | |
|---|---|
boolean |
isSet(int index)
Returns true if the specified array index should be non-null. |
void |
readFrom(ObjectInputStream in)
Reads this mask from the specified input stream. |
void |
set(int index)
Sets the bit indicating that the specified array index is non-null. |
void |
writeTo(ObjectOutputStream out)
Writes this mask to the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] _mask
| Constructor Detail |
|---|
public ArrayMask()
public ArrayMask(int length)
| Method Detail |
|---|
public void set(int index)
public boolean isSet(int index)
public void writeTo(ObjectOutputStream out)
throws IOException
IOException
public void readFrom(ObjectInputStream in)
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||