private int[][] getTopicArray(int segIdx, int maxTopics) {
        if (segIdx < 0) {
            return new int[0][0];
        }

        int numTopics = getNumTopics(segIdx);
        if ((maxTopics > 0) && (numTopics > maxTopics)) {
            numTopics = maxTopics;
        }

        int[][] topics = new int[numTopics][2];
        ByteBuffer buf =  getIndirectRecordEntry(segIdx,4+8*numTopics);
        for(int i=0; i<numTopics; i++){
            topics[i][0] = buf.getInt(4+8*i);
            topics[i][1] = buf.getInt(8+8*i);
        }
        return topics;
    }
Reads the topics and other metadata for a segment from the
(memory-mapped) metadata file. Returns the info in a
two-dimensional array (one row per topic).
@param segIdx     The FSA index (hash value) for the segment.
@param maxTopics  Max number of topics to return, 0 for all topics.
@return Number of topics for the segment.
fsa/src/main/java/com/yahoo/fsa/topicpredictor/TopicPredictor.java