Convertir un tableau de int en un tableau d’octet

Author:

 java, table
{filelink=4679}


public class Tab_Conversion2 {

  /*
   * La fonction reçoit un tableau
   * de int en paramètre et retourne
   * un tableau d'octet comme valeur
   */
  public static byte[] int2byte(int[]int_Tab)
  {

    int intTab_Length = int_Tab.length;
    byte[]byte_Tab = new byte[intTab_Length << 2];

    for (int i=0; i>> 0) & 0xff);
        byte_Tab[j++] = (byte) ((x >>> 8) & 0xff);
        byte_Tab[j++] = (byte) ((x >>> 16) & 0xff);
        byte_Tab[j++] = (byte) ((x >>> 24) & 0xff);
    	}
    return byte_Tab;
	}
}

A Voir sur le même Sujet:

  • caster un entier en octet python
  • fonction counvert un tableau de bayte à un tabeau de int en java
  • dessin un tableau de conversion des octets
  • transformer un tableau de byte en plusieurs tableau
  • convertir un tableau d'entier en byte
  • convertir tableau byte int java
  • conversion int en byte java
  • convertir un tableau au entier
  • tableau de byte convertir en binaire en java
  • comment convertir un nombre en octet à un nombre en gega octet

Leave a Reply

Your email address will not be published. Required fields are marked *