public class MacConverter extends AbstractBaseConverter<Mac>
String
into a Mac
.
For a description of the transformation parameter format, see Mac.getInstance(String)
.
To get a Mac from a specific Provider
, use the syntax algorithm:provider
as described by
Mac.getInstance(String, String)
.
Example:
@Parameter(names = { "--mac" }, converter = MacConverter.class)
private Mac mac;
Mac
,
Mac.getInstance(String)
,
Mac.getInstance(String, String)
failOnNull, targetClass
Constructor and Description |
---|
MacConverter(String optionName)
Constructs a converter.
|
Modifier and Type | Method and Description |
---|---|
protected Mac |
convertImpl(String value)
Converts a value.
|
convert, getErrorString, isSingle, newParameterException, newParameterException, split, toInt, toURI
public MacConverter(String optionName)
optionName
- The option name, may be null.protected Mac convertImpl(String value) throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException
AbstractBaseConverter
convertImpl
in class AbstractBaseConverter<Mac>
value
- the value to convertNoSuchAlgorithmException
NoSuchPaddingException
NoSuchProviderException
Copyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0