public char dequeue() {
		synchronized (this) {
			while (buffer.length() == 0) {
				try {
					isWaiting = true;
					wait();
					isWaiting = false;
				} catch (InterruptedException ex) {
					/* Empty */
				}
			}
			char ch = buffer.charAt(0);
			buffer = buffer.substring(1);
			return ch;
		}
	}