@Override
	public void read(DataInputStream dis) {
		// TODO Auto-generated method stub
		try {
			L = dis.readLong();
			U = dis.readLong();
			v = dis.readLong();
			base = dis.readInt();
			m = (int)(Math.log(U - L) / Math.log(base));
			int len = dis.readInt();
			whichSide = dis.readInt();
			MHTree = new byte[len][];
			for(int i = 0; i < len ; i++){
				MHTree[i] = IO.readBytes(dis);
			}
			valueL = new int[m + 1][m + 1];
			valueU = new int[m + 1][m + 1];
			GvalueL = new byte[m + 1][m + 1][];
			GvalueU = new byte[m + 1][m + 1][];
			GvalueLs = new byte[m + 1][];
			GvalueUs = new byte[m + 1][];
			for(int i = 0; i <= m; i ++){
				for(int j = 0; j <= m ; j ++){
					valueL[i][j] = dis.readInt(); // for no using here
					valueU[i][j] = dis.readInt();
				}
				if(dis.readBoolean()){
					for(int j = 0; j <= m; j++){
						//System.out.println(i + "\t" + j);
						GvalueL[i][j] = IO.readBytes(dis);
					}
				}
				if(dis.readBoolean()){
					for(int j = 0; j <= m ;j++){
						GvalueU[i][j] = IO.readBytes(dis);
					}
				}
				GvalueLs[i] = IO.readBytes(dis);
				GvalueUs[i] = IO.readBytes(dis);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}