private static byte[] deserializeIV(InputStream stream) throws IOException, MessageFormatException {
    DataInputStream inputStream = new DataInputStream(stream);
    short version = inputStream.readShort();
    switch (version) {
      case IV_RECORD_VERSION_V_1:
        return IVRecord_Format_V1.deserializeIVRecord(inputStream);
      default:
        throw new MessageFormatException("IVRecord version not supported",
            MessageFormatErrorCodes.UnknownFormatVersion);
    }
  }
Deserialize IV from the stream
@param stream the stream from which IV needs to be deserialized
@return the IV of type byte array thus deserialized
@throws IOException
@throws MessageFormatException
ambry-router/src/main/java/com/github/ambry/router/GCMCryptoService.java