1 16 17 package org.apache.xerces.impl.io; 18 19 import java.io.CharConversionException ; 20 import java.util.Locale ; 21 import org.apache.xerces.util.MessageFormatter; 22 23 34 public class MalformedByteSequenceException extends CharConversionException { 35 36 37 static final long serialVersionUID = 8436382245048328739L; 38 39 43 44 private MessageFormatter fFormatter; 45 46 47 private Locale fLocale; 48 49 50 private String fDomain; 51 52 53 private String fKey; 54 55 56 private Object [] fArguments; 57 58 59 private String fMessage; 60 61 65 78 public MalformedByteSequenceException(MessageFormatter formatter, 79 Locale locale, String domain, String key, Object [] arguments) { 80 fFormatter = formatter; 81 fLocale = locale; 82 fDomain = domain; 83 fKey = key; 84 fArguments = arguments; 85 } 87 91 96 public String getDomain () { 97 return fDomain; 98 } 100 105 public String getKey () { 106 return fKey; 107 } 109 116 public Object [] getArguments () { 117 return fArguments; 118 } 120 125 public String getMessage() { 126 if (fMessage == null) { 127 fMessage = fFormatter.formatMessage(fLocale, fKey, fArguments); 128 fFormatter = null; 131 fLocale = null; 132 } 133 return fMessage; 134 } 136 } | Popular Tags |