public byte[] toByteArray() throws MessagingException {
  ByteArrayOutputStream headersBytes=new ByteArrayOutputStream();
  writeTo(headersBytes);
  return headersBytes.toByteArray();
}

public byte [ ] toByteArray ( ) throws MessagingException { ByteArrayOutputStream headersBytes = new ByteArrayOutputStream ( ) ; writeTo ( headersBytes ) ; return headersBytes . toByteArray ( ) ; }
generate a representation of the headers as a series of bytes .
