public void readFromStream(InputStream is, boolean clear) throws IOException {
		if(clear) {
			ObjectList.clear();
			ObjectNames.clear();
			ObjectType.clear();
		}

		DataInputStream dis = new DataInputStream(is);

		String name;
		Types type;
		String s;
		FileWriter fw;

		while(dis.readBoolean()) {
			name = dis.readUTF();
			type = Types.values()[dis.readInt()];

			switch(type) {
				case OBJECT_ARRAY:{
					fw = new FileWriter();
					fw.readFromStream(dis,true);
					FileWriter[] temp = new FileWriter[(int) fw.get(SIZE)];
					for(int i = 0; i<temp.length;i++){
						temp[i] = (FileWriter) fw.get(i+"");
					}
					add(temp,name);
					break;
				}
				case ISAVEABLE: {
					fw = new FileWriter();
					fw.readFromStream(dis, true);
					add(fw, name);
					break;
				}
				default: {
					s = dis.readUTF();
					toObject(name, type, s);
				}
			}
		}
	}