@Override
	public int read() throws IOException {
		if(bufferFilled!=0){
			int byte_ = 0;
			Boolean bit;
			for(int i = 0; i < 8; i++){
				bit = readBit();
				if(bit==null)
					return -1;
				byte_<<=1;
				if(bit)
					byte_++;
			}
			return byte_;
		}
		return in.read();
	}