FileDocCategorySizeDatePackage
MalformedByteSequenceException.javaAPI DocApache Xerces 3.0.14429Fri Sep 14 20:33:52 BST 2007org.apache.xerces.impl.io

MalformedByteSequenceException

public class MalformedByteSequenceException extends CharConversionException

Signals that a malformed byte sequence was detected by a java.io.Reader that decodes bytes of a given encoding into characters.

xerces.internal
author
Michael Glavassevich, IBM
version
$Id: MalformedByteSequenceException.java 539931 2007-05-20 20:27:43Z mrglavas $

Fields Summary
static final long
serialVersionUID
Serialization version.
private org.apache.xerces.util.MessageFormatter
fFormatter
message formatter
private Locale
fLocale
locale for error message
private String
fDomain
error domain
private String
fKey
key for the error message
private Object[]
fArguments
replacement arguements for the error message
private String
fMessage
message text for this message, initially null
Constructors Summary
public MalformedByteSequenceException(org.apache.xerces.util.MessageFormatter formatter, Locale locale, String domain, String key, Object[] arguments)
Constructs a MalformedByteSequenceException with the given parameters which may be passed to an error reporter to generate a localized string for this exception.

param
formatter The MessageFormatter used for building the message text for this exception.
param
locale The Locale for which messages are to be reported.
param
domain The error domain.
param
key The key of the error message.
param
arguments The replacement arguments for the error message, if needed.

    
    //
    // Constructors
    //

                                                                                                                                 
      
                
        fFormatter = formatter;
        fLocale = locale;
        fDomain = domain;
        fKey = key;
        fArguments = arguments;
    
Methods Summary
public java.lang.Object[]getArguments()

Returns the replacement arguments for the error message or null if none exist.

return
the replacement arguments for the error message or null if none exist

    	return fArguments;
    
public java.lang.StringgetDomain()

Returns the error domain of the error message.

return
the error domain

    	return fDomain;
    
public java.lang.StringgetKey()

Returns the key of the error message.

return
the error key of the error message

    	return fKey;
    
public synchronized java.lang.StringgetMessage()

Returns the localized message for this exception.

return
the localized message for this exception.

        if (fMessage == null) {
            fMessage = fFormatter.formatMessage(fLocale, fKey, fArguments);
            // The references to the message formatter and locale
            // aren't needed anymore so null them.
            fFormatter = null;
            fLocale = null;
        }
        return fMessage;