2 * Copyright 2011 BitMeister Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package jp.bitmeister.asn1.type.useful;
18 import java.nio.charset.Charset;
19 import java.util.regex.Pattern;
21 import jp.bitmeister.asn1.annotation.ASN1BuiltIn;
22 import jp.bitmeister.asn1.annotation.ASN1Tag;
23 import jp.bitmeister.asn1.type.ASN1TagClass;
24 import jp.bitmeister.asn1.type.ASN1TagMode;
25 import jp.bitmeister.asn1.type.StringType;
28 * Represents ASN.1 'VideotexString' type.
31 * An instance of this class represents a 'VideotexString' type data. Characters
32 * which can appear in the {@code VideotexString} are defined in some CCITT
33 * recommendations. In this library, ISO-8859-1 encoding is used for this type.
36 * @author WATANABE, Jun. <jwat at bitmeister.jp>
39 @ASN1Tag(tagClass = ASN1TagClass.UNIVERSAL, value = 21, tagMode = ASN1TagMode.IMPLICIT)
40 public class VideotexString extends StringType {
43 * The name of character set that is used for converting value to
44 * {@code String}. Default value for this type is 'ISO-8859-1'.
46 public static String charsetName = "ISO-8859-1";
49 * Instantiates an empty {@code VideotexString}.
51 public VideotexString() {
55 * Instantiates an {@code VideotexString} and initialize it with the
56 * {@code String} value.
59 * The value assigned to the instance.
61 public VideotexString(String value) {
68 * @see jp.bitmeister.asn1.type.StringType#charset()
71 public Charset charset() {
72 return Charset.forName(charsetName);
78 * @see jp.bitmeister.asn1.type.StringType#pattern()
81 protected Pattern pattern() {