public void readFrom(ChannelBuffer data){
  this.portNumber=data.readShort();
  if (this.hardwareAddress == null)   this.hardwareAddress=new byte[OFP_ETH_ALEN];
  data.readBytes(this.hardwareAddress);
  byte[] name=new byte[16];
  data.readBytes(name);
  int index=0;
  for (  byte b : name) {
    if (0 == b)     break;
    ++index;
  }
  this.name=new String(Arrays.copyOf(name,index),Charset.forName("ascii"));
  this.config=data.readInt();
  this.state=data.readInt();
  this.currentFeatures=data.readInt();
  this.advertisedFeatures=data.readInt();
  this.supportedFeatures=data.readInt();
  this.peerFeatures=data.readInt();
}

public void readFrom ( ChannelBuffer data ) { this . portNumber = data . readShort ( ) ; if ( this . hardwareAddress == null ) this . hardwareAddress = new byte [ OFP_ETH_ALEN ] ; data . readBytes ( this . hardwareAddress ) ; byte [ ] name = new byte [ 16 ] ; data . readBytes ( name ) ; int index = 0 ; for ( byte b : name ) { if ( 0 == b ) break ; ++ index ; } this . name = new String ( Arrays . copyOf ( name , index ) , Charset . forName ( "ascii" ) ) ; this . config = data . readInt ( ) ; this . state = data . readInt ( ) ; this . currentFeatures = data . readInt ( ) ; this . advertisedFeatures = data . readInt ( ) ; this . supportedFeatures = data . readInt ( ) ; this . peerFeatures = data . readInt ( ) ; }
read this message off the wire from the specified bytebuffer
