int i = 0;
    public static OMText read(DataInputStream dis) throws IOException {        OMText text = null;        float lat = 0;        float lon = 0;        int x = 0;        int y = 0;        int i = 0;        int just = 0;        int length;        String string, font;        int renderType = dis.readInt();        switch (renderType) {        case RENDERTYPE_OFFSET:            lat = dis.readFloat();            lon = dis.readFloat();        case RENDERTYPE_XY:            x = dis.readInt();            y = dis.readInt();            break;        case RENDERTYPE_LATLON:        default:            lat = dis.readFloat();            lon = dis.readFloat();        }        just = dis.readInt();        LinkProperties properties = new LinkProperties(dis);        string = properties.getProperty(LPC_LINKTEXTSTRING);        font = properties.getProperty(LPC_LINKTEXTFONT);        if (string == null)            string = "";        if (font == null)            font = DEFAULT_FONT;        switch (renderType) {        case RENDERTYPE_OFFSET:            text = new OMText(lat, lon, x, y, string, OMText.rebuildFont(font), just);            break;        case RENDERTYPE_XY:            text = new OMText(x, y, string, OMText.rebuildFont(font), just);            break;        case RENDERTYPE_LATLON:        default:            text = new OMText(lat, lon, string, OMText.rebuildFont(font), just);        }        if (text != null) {            properties.setProperties(text);            text.setBaseline(PropUtils.intFromProperties(properties,                    LPC_LINKTEXTBASELINE,                    BASELINE_BOTTOM));            text.setRotationAngle((double) ProjMath.degToRad(PropUtils.floatFromProperties(properties,                    LPC_LINKROTATION,                    0.0f)));        }        return text;    }