public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }
public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }
public int processBinarySavable(Savable object) throws IOException { if (object == null) { return -1; } Class<? extends Savable> clazz = object.getClass(); BinaryClassObject bco = classes.get(object.getClass().getName()); // is this class been looked at before? in tagTable? if (bco == null) { bco = createClassObject(object.getClass()); } // is object in contentTable? if (contentTable.get(object) != null) { return (contentTable.get(object).getId()); } BinaryIdContentPair newPair = generateIdContentPair(bco); BinaryIdContentPair old = contentTable.put(object, newPair); if (old == null) { contentKeys.add(object); } object.write(this); newPair.getContent().finish(); return newPair.getId(); }