FileDocCategorySizeDatePackage
MalformedByteSequenceException.javaAPI DocJava SE 6 API4133Tue Jun 10 00:22:42 BST 2008com.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.

xerces.internal
author
Michael Glavassevich, IBM
version
$Id: MalformedByteSequenceException.java,v 1.2.6.1 2005/09/09 07:22:54 neerajbj Exp $

Fields Summary
static final long
serialVersionUID
Serialization version.
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.

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