code: protected boolean read(ByteBuffer buffer) throws IOException{
          while(buffer.hasRemaining()){
              int read = in.read(buffer);
              if(read==0){
                  in.addReadInterest();
                  return false;
              }else if(read==-1)
                  return true;
          }
          return true;
      }
docs: /*-------------------------------------------------[ readBuffer ]---------------------------------------------------