Mercurial > hg > blitz_condensed
diff src/org/dancres/blitz/entry/FixedOIDs.java @ 0:3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 11:00:06 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/dancres/blitz/entry/FixedOIDs.java Sat Mar 21 11:00:06 2009 +0000 @@ -0,0 +1,29 @@ +package org.dancres.blitz.entry; + +import org.dancres.util.BytePacker; + +/** + Various fixed OIDs are used to store meta data in the registry associated + with a particular type. This class encapsulates all the knowledge of what + OIDs are used to store which bits of information. + */ +class FixedOIDs { + private static final long INDEXES_OID = 0; + private static final long SUBTYPES_OID = 1; + + static final byte[] INDEXES_KEY = + keyFor(INDEXES_OID); + + static final byte[] SUBTYPES_KEY = + keyFor(SUBTYPES_OID); + + static byte[] keyFor(long anId) { + byte[] myKey = new byte[8]; + + BytePacker myPacker = BytePacker.getMSBPacker(myKey); + myPacker.putLong(anId, 0); + + return myKey; + } + +}