public byte[] toByteArray(){
  final int outLen=nonce_.length + (Long.SIZE / Byte.SIZE);
  final ByteBuffer out=ByteBuffer.allocate(outLen);
  out.put(nonce_);
  out.putLong(contentLength_);
  return out.array();
}

public byte [ ] toByteArray ( ) { final int outLen = nonce_ . length + ( Long . SIZE / Byte . SIZE ) ; final ByteBuffer out = ByteBuffer . allocate ( outLen ) ; out . put ( nonce_ ) ; out . putLong ( contentLength_ ) ; return out . array ( ) ; }
serialize the header into a byte array .
