}
public static byte[] asByteArray(TCredentials cred) throws AccumuloSecurityException {
TSerializer ts = new TSerializer();
try {
return ts.serialize(cred);
} catch (TException e) {
// This really shouldn't happen
log.error(e, e);
throw new AccumuloSecurityException(cred.getPrincipal(), SecurityErrorCode.SERIALIZATION_ERROR);
}