public boolean readColorModel(InputStream in) throws java.io.IOException {
		int len=readInt(in);
		//System.out.println("len="+len);
		if(!_isConnected) return false;
		readBytes(colormap,in,len*3);
		if(!_isConnected) return false;
		//we'll do this stupid thing because we can't change an existing color model, and we don't want to make a new one for each frame
		// (btw, java is stupid) [cjcase: lol, true that]
		boolean makeNew=false;
		if(cmodel==null || len!=cmodel.getMapSize()) {
			makeNew=true;
		} else {
			int off=0;
			for(int i=0; i<len; i++) {
				if((byte)cmodel.getRed(i)!=colormap[off++] || (byte)cmodel.getGreen(i)!=colormap[off++] || (byte)cmodel.getBlue(i)!=colormap[off++]) {
					makeNew=true;
					break;
				}
			}
		}
		if(makeNew) {
			//System.out.println("new color model");
			cmodel=new IndexColorModel(7,len,colormap,0,false);
		}
		return true;
	}