* each object as they are written to the output stream.
*/
public class ObjectToPack extends PackedObjectInfo {
- private static final int WANT_WRITE = 1 << 0;
-
private static final int REUSE_AS_IS = 1 << 1;
private static final int DO_NOT_DELTA = 1 << 2;
/**
* Bit field, from bit 0 to bit 31:
* <ul>
- * <li>1 bit: wantWrite</li>
+ * <li>1 bit: unused</li>
* <li>1 bit: canReuseAsIs</li>
* <li>1 bit: doNotDelta</li>
* <li>1 bit: edgeObject</li>
* @return true if object is already written; false otherwise.
*/
public final boolean isWritten() {
- return getOffset() != 0;
+ return 1 < getOffset(); // markWantWrite sets 1.
}
/** @return the type of this object. */
}
final boolean wantWrite() {
- return (flags & WANT_WRITE) != 0;
+ return getOffset() == 1;
}
final void markWantWrite() {
- flags |= WANT_WRITE;
+ setOffset(1);
}
/**