public ArrayList<String> listarLinks() throws GlobalException, NoDataException{      
        try {
            conectar(user, pass,ip,port,db);      
        }
        catch(ClassNotFoundException ex)
        {
            throw new GlobalException("No se ha localizado el Driver");
        }
        
        catch (SQLException e) {
            throw new NoDataException("La base de datos no se encuentra disponible");
        }      
        
        ResultSet rs=null;
        ArrayList<String> coleccion= new ArrayList();
        Statement stmt = null;
        try{
            stmt = conexion.createStatement();          
            rs = stmt.executeQuery(OBTENERLINKS);
             while (rs.next()) {
                 String aux = rs.getString(1);
                 coleccion.add(aux);
            }
        } catch (SQLException e) {
          e.printStackTrace();
          
       throw new GlobalException("Sentencia no valida");
        } finally {
            try {
                if (rs != null) {
                    rs.close();
                }
                if (stmt != null) {
                    stmt.close();
                }
                desconectar();
            } catch (SQLException e) {
                throw new GlobalException("Estatutos invalidos o nulos");
            }
        }
        if (coleccion == null || coleccion.size() == 0) {
            throw new NoDataException("No hay datos");
        }
        return coleccion;
    }