It is necessary to set a constant signature array. I'm doing this now
byte sgn[] = {(byte)0xFF, (byte)0xD8, (byte)0xFF}; Question: Is it possible to somehow ask him not casting each element to the byte ?
Something like that
byte [] sgn = Array.fromRaw(0xFF, 0xD8, 0xFF)
(byte)0xFFwill turn into-1, the same without a cast can be obtained by writing-0x01, or just-1as a decimal number. - Vartlok0xFFis 255? and thatbyterange from -128 to 127? You are trying to shove a number where it does not fit. - Vartlokbyte sgn[] = { -1, -40, -1 };? - Regentintarray, specified in the formnew int[] { 0xFF, 0xD8, 0xFF }, will be converted into abytearray in a loop. - Regent