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.
  • Element Details

    • order

      The byte order to use during the conversion. Note that this is NOT ByteOrder because that is not an enum (and can not be used in an annotation).
      Returns:
      the byte order to use, either BIG_ENDIAN or LITTLE_ENDIAN.
      Default:
      BIG_ENDIAN