protected Object readValue(DataInputStream dis) throws Exception {
        Object result = null;
        switch (this.type) {
        case Type.TAG_Byte:
            result = dis.readByte();
            break;
        case Type.TAG_Double:
            result = dis.readDouble();
            break;
        case Type.TAG_Float:
            result = dis.readFloat();
            break;
        case Type.TAG_Int:
            result = dis.readInt();
            break;
        case Type.TAG_Long:
            result = dis.readLong();
            break;
        case Type.TAG_Short:
            result = dis.readShort();
            break;
        case Type.TAG_String:
            result = dis.readUTF();
            break;
        }
        return result;
    }