oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tar/binaries/BinaryReferencesIndexLoaderV1.java [109:148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static Map<UUID, Set<String>> parseEntriesBySegment(Buffer buffer) {
        return parseEntriesBySegment(buffer.getInt(), buffer);
    }

    private static Map<UUID, Set<String>> parseEntriesBySegment(int count, Buffer buffer) {
        Map<UUID, Set<String>> result = new HashMap<>(count);
        for (int i = 0; i < count; i++) {
            UUID k = parseUUID(buffer);
            Set<String> v = parseEntries(buffer);
            result.put(k, v);
        }
        return result;
    }

    private static UUID parseUUID(Buffer buffer) {
        long msb = buffer.getLong();
        long lsb = buffer.getLong();
        return new UUID(msb, lsb);
    }

    private static Set<String> parseEntries(Buffer buffer) {
        return parseEntries(buffer.getInt(), buffer);
    }

    private static Set<String> parseEntries(int count, Buffer buffer) {
        Set<String> entries = new HashSet<>(count);
        for (int i = 0; i < count; i++) {
            entries.add(parseString(buffer));
        }
        return entries;
    }

    private static String parseString(Buffer buffer) {
        return parseString(buffer.getInt(), buffer);
    }

    private static String parseString(int length, Buffer buffer) {
        byte[] data = new byte[length];
        buffer.get(data);
        return new String(data, Charsets.UTF_8);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tar/binaries/BinaryReferencesIndexLoaderV2.java [111:150]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static Map<UUID, Set<String>> parseEntriesBySegment(Buffer buffer) {
        return parseEntriesBySegment(buffer.getInt(), buffer);
    }

    private static Map<UUID, Set<String>> parseEntriesBySegment(int count, Buffer buffer) {
        Map<UUID, Set<String>> result = new HashMap<>(count);
        for (int i = 0; i < count; i++) {
            UUID k = parseUUID(buffer);
            Set<String> v = parseEntries(buffer);
            result.put(k, v);
        }
        return result;
    }

    private static UUID parseUUID(Buffer buffer) {
        long msb = buffer.getLong();
        long lsb = buffer.getLong();
        return new UUID(msb, lsb);
    }

    private static Set<String> parseEntries(Buffer buffer) {
        return parseEntries(buffer.getInt(), buffer);
    }

    private static Set<String> parseEntries(int count, Buffer buffer) {
        Set<String> entries = new HashSet<>(count);
        for (int i = 0; i < count; i++) {
            entries.add(parseString(buffer));
        }
        return entries;
    }

    private static String parseString(Buffer buffer) {
        return parseString(buffer.getInt(), buffer);
    }

    private static String parseString(int length, Buffer buffer) {
        byte[] data = new byte[length];
        buffer.get(data);
        return new String(data, Charsets.UTF_8);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



