List of usage examples for org.apache.hadoop.crypto CryptoProtocolVersion supports
public static boolean supports(CryptoProtocolVersion version)
From source file:com.mellanox.r4h.DFSClient.java
License:Apache License
/** * Obtain the crypto protocol version from the provided FileEncryptionInfo, * checking to see if this version is supported by. * /*w w w.j a v a 2s . co m*/ * @param feInfo * FileEncryptionInfo * @return CryptoProtocolVersion from the feInfo * @throws IOException * if the protocol version is unsupported. */ private static CryptoProtocolVersion getCryptoProtocolVersion(FileEncryptionInfo feInfo) throws IOException { final CryptoProtocolVersion version = feInfo.getCryptoProtocolVersion(); if (!CryptoProtocolVersion.supports(version)) { throw new IOException("Client does not support specified " + "CryptoProtocolVersion " + version.getDescription() + " version " + "number" + version.getVersion()); } return version; }