blob: 5894c9df07b88801a5a45885436c9f4838aa9ef0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/* ____ ____ ____ ____ ______ *\
** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
** /_____/\____/\___/\____/____/ **
\* */
// $Id$
package ch.epfl.lamp.util;
/** This class contains properties of HTML document representation
* (see http://www.w3.org/TR/REC-html40/charset.html).
*/
public class HTMLRepresentation {
//########################################################################
// Private Fields
/** The document type */
private final String type;
/** The document character encoding */
private final String encoding;
/** The document language */
private final String language;
//########################################################################
// Public Constructors
/** Creates a new instance */
public HTMLRepresentation(String type, String encoding, String language) {
this.type = type;
this.encoding = encoding;
this.language = language;
}
/** Creates a new instance */
public HTMLRepresentation(String type, String encoding) {
this(type, encoding, "EN");
}
/** Creates a new instance */
public HTMLRepresentation(String type) {
this(type, "iso-8859-1", "EN");
}
/** Creates a new instance */
public HTMLRepresentation() {
this("HTML 4.01 Transitional", "iso-8859-1", "EN");
}
//########################################################################
// Public Methods - Getting & Setting
/** Returns the underlying document type. */
public String getType() {
return type;
}
/** Returns the underlying character encoding. */
public String getEncoding() {
return encoding;
}
/** Returns the underlying character encoding. */
public String getLanguage() {
return language;
}
}
|