FileDocCategorySizeDatePackage
MalformedByteSequenceException.javaAPI DocJava SE 5 API4007Fri Aug 26 14:55:48 BST 2005com.sun.org.apache.xerces.internal.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.

author
Michael Glavassevich, IBM
version
$Id: MalformedByteSequenceException.java,v 1.1.1.1 2004/05/04 10:22:02 vk112360 Exp $

Fields Summary
private 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(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.

        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 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;