Annotation Type NumberToByteArrayConversion
@Target(PARAMETER)
@Retention(RUNTIME)
@ConvertWith(NumberToByteArrayArgumentConverter.class)
public @interface NumberToByteArrayConversion
Annotation to convert an integral type (byte, short, int, long) to a byte array.
The converter uses
ByteBuffer under the hood.-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe byte order to use during the conversion.
-
Element Details
-
order
The byte order to use during the conversion. Note that this is NOTByteOrderbecause that is not an enum (and can not be used in an annotation).- Returns:
- the byte order to use, either
BIG_ENDIANorLITTLE_ENDIAN.
- Default:
BIG_ENDIAN
-