1 16 17 package com.sun.org.apache.xerces.internal.impl.io; 18 19 import java.io.CharConversionException ; 20 import java.util.Locale ; 21 import com.sun.org.apache.xerces.internal.util.MessageFormatter; 22 23 32 public class MalformedByteSequenceException extends CharConversionException { 33 34 38 39 private MessageFormatter fFormatter; 40 41 42 private Locale fLocale; 43 44 45 private String fDomain; 46 47 48 private String fKey; 49 50 51 private Object [] fArguments; 52 53 54 private String fMessage; 55 56 60 73 public MalformedByteSequenceException(MessageFormatter formatter, 74 Locale locale, String domain, String key, Object [] arguments) { 75 fFormatter = formatter; 76 fLocale = locale; 77 fDomain = domain; 78 fKey = key; 79 fArguments = arguments; 80 } 82 86 91 public String getDomain () { 92 return fDomain; 93 } 95 100 public String getKey () { 101 return fKey; 102 } 104 111 public Object [] getArguments () { 112 return fArguments; 113 } 115 120 public String getMessage() { 121 if (fMessage == null) { 122 fMessage = fFormatter.formatMessage(fLocale, fKey, fArguments); 123 fFormatter = null; 126 fLocale = null; 127 } 128 return fMessage; 129 } 131 } | Popular Tags |