MemoryFont.java 1.77 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.fontengine.fontmanagement;

import com.adobe.fontengine.font.FontData;
import com.adobe.fontengine.font.FontImpl;
import com.adobe.fontengine.font.InvalidFontException;
import com.adobe.fontengine.font.UnsupportedFontException;
import java.util.Map;

/*
 * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
 */
public final class MemoryFont
extends FontImpl {
    static final long serialVersionUID = 1;
    FontData fontRef;

    public MemoryFont(FontData fontData) {
        this.fontRef = fontData;
    }

    @Override
    public int hashCode() {
        return this.fontRef.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj != null) {
            if (this == obj) {
                return true;
            }
            if (obj instanceof MemoryFont && this.fontRef.equals(((MemoryFont)obj).fontRef)) {
                return true;
            }
        }
        return false;
    }

    @Override
    public String toString() {
        return this.fontRef + " = " + this.fontRef.toString();
    }

    @Override
    protected FontData retrieveFontData() throws InvalidFontException, UnsupportedFontException {
        return this.fontRef;
    }

    @Override
    public String getCanonicalPath() {
        return null;
    }

    @Override
    public long getLength() {
        return 0;
    }

    @Override
    public long getLastModified() {
        return 0;
    }

    @Override
    public Object getCachedFontDescription(String key) {
        return null;
    }

    @Override
    public Map<String, Object> getCachedFontDescriptionMap() {
        return null;
    }

    @Override
    public void setCachedFontDescription(String key, Object value) {
    }
}