Code example for SelectionKey

Methods: attachment, interestOps, isAcceptable, isConnectable, isReadable, isValid, isWritable

0
		} 
 
		public boolean getRunning() { 
			return this.running;
		} 
 
		public void setRunning(boolean run_flag) {
			this.running = run_flag;
		} 
		 
		private boolean hasFrame(ByteBuffer buff){
			// determite the byte at this position is 0x55 
			buff.mark();
			boolean re = false;
			if( buff.get() == (byte)0x55){
				re = true;
			} 
			else { 
				re = false;
			}