class KerningTable extends TTFTable
{
    private static final Logger LOG = LogManager.getLogger(KerningTable.class);

    /**
     * Tag to identify this table.
     */
    public static final String TAG = "kern";

    private KerningSubtable[] subtables;

    KerningTable()
    {
    }

    /**
     * This will read the required data from the stream.
     *
     * @param ttf The font that is being read.
     * @param data The stream to read the data from.
     * @throws IOException If there is an error reading the data.
     */
    @Override
    void read(TrueTypeFont ttf, TTFDataStream data) throws IOException
    {<FILL_FUNCTION_BODY>}

    /**
     * Obtain first subtable that supports non-cross-stream horizontal kerning.
     *
     * @return first matching subtable or null if none found
     */
    public KerningSubtable getHorizontalKerningSubtable()
    {
        return getHorizontalKerningSubtable(false);
    }

    /**
     * Obtain first subtable that supports horizontal kerning with specified cross stream.
     *
     * @param cross true if requesting cross stream horizontal kerning
     * @return first matching subtable or null if none found
     */
    public KerningSubtable getHorizontalKerningSubtable(boolean cross)
    {
        if (subtables != null)
        {
            for (KerningSubtable s : subtables)
            {
                if (s.isHorizontalKerning(cross))
                {
                    return s;
                }
            }
        }
        return null;
    }
}

        int version = data.readUnsignedShort();
        if (version != 0)
        {
            version = (version << 16) | data.readUnsignedShort();
        }
        int numSubtables = 0;
        switch (version)
        {
            case 0:
                numSubtables = data.readUnsignedShort();
                break;
            case 1:
                numSubtables = (int) data.readUnsignedInt();
                break;
            default:
                LOG.debug("Skipped kerning table due to an unsupported kerning table version: {}",
                        version);
                break;
        }
        if (numSubtables > 0)
        {
            subtables = new KerningSubtable[numSubtables];
            for (int i = 0; i < numSubtables; ++i)
            {
                KerningSubtable subtable = new KerningSubtable();
                subtable.read(data, version);
                subtables[i] = subtable;
            }
        }
        initialized = true;
    
<methods>public long getCheckSum() ,public boolean getInitialized() ,public long getLength() ,public long getOffset() ,public java.lang.String getTag() <variables>private long checkSum,protected boolean initialized,private long length,private long offset,private java.lang.String tag