comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.entry;
2
3 import org.dancres.util.BytePacker;
4
5 /**
6 Various fixed OIDs are used to store meta data in the registry associated
7 with a particular type. This class encapsulates all the knowledge of what
8 OIDs are used to store which bits of information.
9 */
10 class FixedOIDs {
11 private static final long INDEXES_OID = 0;
12 private static final long SUBTYPES_OID = 1;
13
14 static final byte[] INDEXES_KEY =
15 keyFor(INDEXES_OID);
16
17 static final byte[] SUBTYPES_KEY =
18 keyFor(SUBTYPES_OID);
19
20 static byte[] keyFor(long anId) {
21 byte[] myKey = new byte[8];
22
23 BytePacker myPacker = BytePacker.getMSBPacker(myKey);
24 myPacker.putLong(anId, 0);
25
26 return myKey;
27 }
28
29 }