public byte[] encode(){
  char type=getAttributeType();
  byte binValue[]=new byte[HEADER_LENGTH + getDataLength() + (4 - getDataLength() % 4) % 4];
  binValue[0]=(byte)(type >> 8);
  binValue[1]=(byte)(type & 0x00FF);
  binValue[2]=(byte)(getDataLength() >> 8);
  binValue[3]=(byte)(getDataLength() & 0x00FF);
  System.arraycopy(software,0,binValue,4,getDataLength());
  return binValue;
}

public byte [ ] encode ( ) { char type = getAttributeType ( ) ; byte binValue [ ] = new byte [ HEADER_LENGTH + getDataLength ( ) + ( 4 - getDataLength ( ) % 4 ) % 4 ] ; binValue [ 0 ] = ( byte ) ( type > > 8 ) ; binValue [ 1 ] = ( byte ) ( type & 0x00FF ) ; binValue [ 2 ] = ( byte ) ( getDataLength ( ) > > 8 ) ; binValue [ 3 ] = ( byte ) ( getDataLength ( ) & 0x00FF ) ; System . arraycopy ( software , 0 , binValue , 4 , getDataLength ( ) ) ; return binValue ; }
returns a binary representation of this attribute .
