private static void readEdgeMega(String filename, boolean directed, boolean symmetric)
throws IOException
{
	InputStream in = new BufferedInputStream(new FileInputStream(filename));
	byte[] buffer = new byte[8];
	
	boolean end =false;
	int edges = 0;
	int olde1 = -1;
	IntArray list = new IntArray(1024);
	while (!end) {
		try {
			int len = in.read(buffer);
			if (len < 0) {
			  neighbors[olde1] = (IntArray) list.clone();
			  if (olde1 > counter) {
			  		counter = olde1;
			  }
				break;
			}
			int e1 = decodeInt(buffer, 0);
			int e2 = decodeInt(buffer, 4);
			if (olde1 != e1) {
				if (olde1 >= 0) {
				  if (olde1 > neighbors.length) {
			  	  		IntArray[] 	temp = new IntArray[olde1*2];
			  	  		System.arraycopy(neighbors, 0, temp, 0, neighbors.length);
			  	  		neighbors = temp;
				  }
				  neighbors[olde1] = (IntArray) list.clone();
				  if (olde1 > counter) {
				  		counter = olde1;
				  }
				}
			  list.reset();
			  olde1 = e1;
			}
		  list.append(e2);
			edges++;
			if (edges % 1000000 == 0)
				System.err.println("Done.... " + edges);
		} catch (EOFException e) {
		  neighbors[olde1] = (IntArray) list.clone();
			end = true;
		}
	}
}