private void read() throws IOException {
		for (;;) {
			if (decoder.decode(readBuffer)) {
				return;
			}

			readBuffer.compact(); // go to write mode
			final int numBytesRead = readChannel.read(readBuffer);

			if (numBytesRead == 0) {
				throw new IllegalStateException("Ready zero (0) bytes from channel");
			}
			else if (numBytesRead < 0) {
				throw new IllegalStateException("Ready EOF (-1) from channel");
			}

			readBuffer.flip();
		}
	}