- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.aoapps.lang.io.LocalizedIOException
-
- All Implemented Interfaces:
LocalizedException,Serializable
public class LocalizedIOException extends IOException implements LocalizedException
ExtendsIOExceptionto provide exceptions with user locale error messages.- Author:
- AO Industries, Inc.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocalizedIOException(Resources resources, String key)LocalizedIOException(Resources resources, String key, Serializable... args)LocalizedIOException(Throwable cause, Resources resources, String key)LocalizedIOException(Throwable cause, Resources resources, String key, Serializable... args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable[]getArgs()StringgetKey()StringgetLocalizedMessage()ResourcesgetResources()Gets the resources used to generate the message ornullwhen the message is not localized and uses a default.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
resources
protected final Resources resources
-
key
protected final String key
-
args
protected final Serializable[] args
-
-
Constructor Detail
-
LocalizedIOException
public LocalizedIOException(Resources resources, String key, Serializable... args)
-
LocalizedIOException
public LocalizedIOException(Throwable cause, Resources resources, String key, Serializable... args)
-
-
Method Detail
-
getLocalizedMessage
public String getLocalizedMessage()
- Specified by:
getLocalizedMessagein interfaceLocalizedException- Overrides:
getLocalizedMessagein classThrowable
-
getResources
public final Resources getResources()
Description copied from interface:LocalizedExceptionGets the resources used to generate the message ornullwhen the message is not localized and uses a default.- Specified by:
getResourcesin interfaceLocalizedException
-
getKey
public final String getKey()
- Specified by:
getKeyin interfaceLocalizedException
-
getArgs
public final Serializable[] getArgs()
- Specified by:
getArgsin interfaceLocalizedException- Returns:
- No defensive copy
-
-