Package ej.cbor
Class ErrorMessage
- java.lang.Object
-
- ej.cbor.ErrorMessage
-
public class ErrorMessage extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intEIGHT_BYTESstatic intFOUR_BYTESstatic intINFINITE_LENGHT_TEXT_STRING_NOT_SUPPORTEDstatic intINFINITE_LENGTH_BYTE_STRING_NOT_SUPPORTEDstatic intINVALID_ARRAY_LENGHTstatic intINVALID_MAJOR_TYPEstatic intINVALID_MAP_LENGHTstatic intNO_PAYLOADstatic intNOT_WELL_FORMED_CBOR_INTEGERstatic intONE_BYTEstatic intSTRING_LENGTH_TOO_LONGstatic intTAG_CANNOT_BE_NEGATIVEstatic intTWO_BYTESstatic intUNEXPECTED_BOOLEAN_VALUEstatic intUNEXPECTED_PAYLOAD_OR_LENGTHstatic intUNEXPECTED_SUBTYPEstatic intUNEXPECTED_TYPEstatic intUNEXPECTED_TYPE_TWO_TYPESstatic intUNKNOWN
-
Constructor Summary
Constructors Constructor Description ErrorMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorMessagegetDefault()Gets the default instance ofErrorMessage.java.lang.StringmessageAt(int errorCode, java.lang.Object... args)GeneratesStringfor a specified error code.
-
-
-
Field Detail
-
INVALID_ARRAY_LENGHT
public static final int INVALID_ARRAY_LENGHT
- See Also:
- Constant Field Values
-
INVALID_MAP_LENGHT
public static final int INVALID_MAP_LENGHT
- See Also:
- Constant Field Values
-
TAG_CANNOT_BE_NEGATIVE
public static final int TAG_CANNOT_BE_NEGATIVE
- See Also:
- Constant Field Values
-
UNEXPECTED_BOOLEAN_VALUE
public static final int UNEXPECTED_BOOLEAN_VALUE
- See Also:
- Constant Field Values
-
INFINITE_LENGTH_BYTE_STRING_NOT_SUPPORTED
public static final int INFINITE_LENGTH_BYTE_STRING_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
STRING_LENGTH_TOO_LONG
public static final int STRING_LENGTH_TOO_LONG
- See Also:
- Constant Field Values
-
INFINITE_LENGHT_TEXT_STRING_NOT_SUPPORTED
public static final int INFINITE_LENGHT_TEXT_STRING_NOT_SUPPORTED
- See Also:
- Constant Field Values
-
UNEXPECTED_TYPE
public static final int UNEXPECTED_TYPE
- See Also:
- Constant Field Values
-
UNEXPECTED_TYPE_TWO_TYPES
public static final int UNEXPECTED_TYPE_TWO_TYPES
- See Also:
- Constant Field Values
-
UNEXPECTED_SUBTYPE
public static final int UNEXPECTED_SUBTYPE
- See Also:
- Constant Field Values
-
NOT_WELL_FORMED_CBOR_INTEGER
public static final int NOT_WELL_FORMED_CBOR_INTEGER
- See Also:
- Constant Field Values
-
UNEXPECTED_PAYLOAD_OR_LENGTH
public static final int UNEXPECTED_PAYLOAD_OR_LENGTH
- See Also:
- Constant Field Values
-
NO_PAYLOAD
public static final int NO_PAYLOAD
- See Also:
- Constant Field Values
-
ONE_BYTE
public static final int ONE_BYTE
- See Also:
- Constant Field Values
-
TWO_BYTES
public static final int TWO_BYTES
- See Also:
- Constant Field Values
-
FOUR_BYTES
public static final int FOUR_BYTES
- See Also:
- Constant Field Values
-
EIGHT_BYTES
public static final int EIGHT_BYTES
- See Also:
- Constant Field Values
-
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
-
INVALID_MAJOR_TYPE
public static final int INVALID_MAJOR_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefault
public static ErrorMessage getDefault()
Gets the default instance ofErrorMessage.- Returns:
- the default
ErrorMessageinstance.
-
messageAt
public java.lang.String messageAt(int errorCode, java.lang.Object... args)GeneratesStringfor a specified error code.- Parameters:
errorCode- the error code corresponding to the message.args- the optional list of arguments to construct the messageString.- Returns:
- the error message
String.
-
-