}
public static WeaselClassFile load(DataInputStream dataInputStream) throws IOException{
int magicNumber = dataInputStream.readInt();
if(magicNumber!=MAGICNUMBER)
throw new WeaselRuntimeException("Magic number isn't the same");
int version = dataInputStream.readInt();
WeaselVersionClassFileLoader wvcfl = null;
for(WeaselVersionGetter wvg:versions){
wvcfl = wvg.getVersionClassFileLoader(version);
if(wvcfl!=null)
break;
}
if(wvcfl==null)
throw new WeaselRuntimeException("Unkonw version %s", version);
return wvcfl.load(dataInputStream);
}