public Savable load(URL f) throws IOException { InputStream is = f.openStream(); Savable rVal = load(is); is.close();
public Savable load(InputStream is) throws IOException { contentTable = new HashMap<Integer, Savable>(); GZIPInputStream zis = new GZIPInputStream(is); BufferedInputStream bis = new BufferedInputStream(zis); int numClasses = ByteUtils.readInt(bis); aliasWidth = ((int)FastMath.log(numClasses, 256) + 1); classes = new HashMap<String, BinaryClassObject>(numClasses); for(int i = 0; i < numClasses; i++) { String alias = readString(bis, aliasWidth);  int classLength = ByteUtils.readInt(bis); String className = readString(bis, classLength); BinaryClassObject bco = new BinaryClassObject(); bco.alias = alias.getBytes(); bco.className = className;  int fields = ByteUtils.readInt(bis); bco.nameFields = new HashMap<String, BinaryClassField>(fields); bco.aliasFields = new HashMap<Byte, BinaryClassField>(fields); for (int x = 0; x < fields; x++) { byte fieldAlias = (byte)bis.read(); byte fieldType = (byte)bis.read();  int fieldNameLength = ByteUtils.readInt(bis); String fieldName = readString(bis, fieldNameLength); BinaryClassField bcf = new BinaryClassField(fieldName, fieldAlias, fieldType); bco.nameFields.put(fieldName, bcf); bco.aliasFields.put(fieldAlias, bcf); } classes.put(alias, bco); }  int numLocs = ByteUtils.readInt(bis); capsuleTable = new IdentityHashMap<Savable, BinaryInputCapsule>(numLocs); locationTable = new HashMap<Integer, Integer>(numLocs); for(int i = 0; i < numLocs; i++) { int id = ByteUtils.readInt(bis); int loc = ByteUtils.readInt(bis); locationTable.put(id, loc); }  @SuppressWarnings("unused") int numbIDs = ByteUtils.readInt(bis);  int id = ByteUtils.readInt(bis); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int size = -1; byte[] cache = new byte[5120]; while((size = bis.read(cache)) != -1) { baos.write(cache, 0, size); } bis = null;  dataArray = baos.toByteArray(); baos = null; Savable rVal = readObject(id); if (debug) { System.err.println("Importer Stats: "); System.err.println("Tags: "+numClasses); System.err.println("Objects: "+numLocs); System.err.println("Data Size: "+dataArray.length); } dataArray = null;
    public Savable load(URL f) throws IOException {        InputStream is = f.openStream();        Savable rVal = load(is);        is.close();        return rVal;    }