Over time this document will contain an explanation of big endian vs little endian works and how java deals with this. Questions I'll try to answer are: What is network byte order? Why all of this matters and maybe even some history

Little Endian
Describes a computer architecture in which, within a given 16- or 32-bit word, bytes at lower addresses have lower significance (the word is stored `little-end-first'). The PDP-11 and VAX families of computers and Intel microprocessors and a lot of communications and networking hardware are little-endian. The term is sometimes used to describe the ordering of units other than bytes; most often, bits within a byte.

Big Endian
Describes a computer architecture in which, within a given multi-byte numeric representation, the most significant byte has the lowest address (the word is stored `big-end-first'). processors, including the IBM 370 family, the PDP-10, the Motorola microprocessor families, and most of the various RISC designs are big-endian. Big-endian byte order is also sometimes called `network order'

Why does this matter?

NUXI problem
Refers to the problem of transferring data between machines with differing byte-order. The string `UNIX' might look like `NUXI' on a machine with a different `byte sex' (e.g., when transferring data from a little-endian to a big-endian, or vice-versa).

A good explanation of the big-endian little-endian issue is at James Curran's website

The descriptions above were adopted from the jargon file at http://www.tuxedo.org/~esr/jargon/html/




public class EndianConversion
{

	/**
	 * converts BigEndian to little Endian
	 * 
	 * 
	 * @param bige bigendian integer
	 * 
	 * 
	 */
	public byte[] convertInt(int bige)
	{
		byte le = new byte[4];
		le[0] = (byte)bige & 0x000000ff;
		le[1] = (byte)((bige & 0x0000ff00)>>8);
		le[2] = (byte)((bige & 0x00ff0000)>>16);
		le[3] = (byte)((bige & 0xff000000)>>24);
		return le;
			
	}

	public static void main (String a[])
	{

		
	}
	
}