/// <exception cref="Org.Apache.Hadoop.Security.Token.SecretManager.InvalidToken"/> public static T GetIdentifier <T>(string id, SecretManager <T> secretManager) where T : TokenIdentifier { byte[] tokenId = DecodeIdentifier(id); T tokenIdentifier = secretManager.CreateIdentifier(); try { tokenIdentifier.ReadFields(new DataInputStream(new ByteArrayInputStream(tokenId)) ); } catch (IOException e) { throw (SecretManager.InvalidToken)Extensions.InitCause(new SecretManager.InvalidToken ("Can't de-serialize tokenIdentifier"), e); } return(tokenIdentifier); }