utilidades
Class UrlUtils

java.lang.Object
  extended by utilidades.UrlUtils

public class UrlUtils
extends java.lang.Object

Clase con métodos para codificar URLs.
----------------------------------------------------------------------------- URL Utils - UrlUtils.java Author: C. Enrique Ortiz Copyright (c) 2004-2005 C. Enrique Ortiz This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Usage & redistributions of source code must retain the above copyright notice. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should get a copy of the GNU Lesser General Public License from the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -----------------------------------------------------------------------------
Modificado por David Domínguez.
La clase contiene un método estático para codificar todos los caracteres, excepto los de tipo mark y los permitidos, de un String que representa una URL. Se ha añadido un método similar pero que no codifica tampoco los caracteres reservados.

Author:
C. Enrique Ortiz, David Domínguez

Field Summary
private static java.lang.String mark
          Caracteres marcas no reservadas
private static java.lang.String reservados
          Caracteres reservados
 
Constructor Summary
UrlUtils()
           
 
Method Summary
static java.lang.String encodeURL(java.lang.String url)
          Encodes a URL - This method assumes UTF-8 Codifica todos los caracteres excepto los permitidos, los reservados y los mark .
static java.lang.String encodeURLReserved(java.lang.String url)
          Encodes a URL - This method assumes UTF-8 Codifica todos los caracteres especiales, incluidos los caracteres reservados.
private static char toHexChar(int digitValue)
          Converts Hex digit to a UTF-8 "Hex" character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mark

private static java.lang.String mark
Caracteres marcas no reservadas


reservados

private static java.lang.String reservados
Caracteres reservados

Constructor Detail

UrlUtils

public UrlUtils()
Method Detail

toHexChar

private static char toHexChar(int digitValue)
Converts Hex digit to a UTF-8 "Hex" character.

Parameters:
digitValue - digit to convert to Hex
Returns:
the converted Hex digit

encodeURLReserved

public static java.lang.String encodeURLReserved(java.lang.String url)
Encodes a URL - This method assumes UTF-8 Codifica todos los caracteres especiales, incluidos los caracteres reservados. Se utiliza para codificar nombres individuales de archivos o directorios de una URL. Método original de la clase.

Parameters:
url - URL to encode
Returns:
the encoded URL

encodeURL

public static java.lang.String encodeURL(java.lang.String url)
Encodes a URL - This method assumes UTF-8 Codifica todos los caracteres excepto los permitidos, los reservados y los mark . Se utiliza para codificar URLs totales o parciales para que no codifique los caracteres reservados, como los separadores, que se supone que son separadores. Método añadido a la clase.

Parameters:
url - string con la URL a codificar
Returns:
string con la URL codificada


Herramienta de Creación de Examen QTI. Universidad de Sevilla. e-REdING. Biblioteca de la Escuela Superior de Ingenieros de Sevilla.


EDITOR DE FORMATO DE LA NORMA QTI DEL IMS

: Domínguez Briante, David
: Ingeniería Telecomunicación
Contenido del proyecto: