
com.autonomy.aci.client.annotations.StringToByteConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aci-annotations-processor Show documentation
Show all versions of aci-annotations-processor Show documentation
Provides a processor factory for use with the OpenText ACI API.
/*
* Copyright 2015 Open Text.
*
* Licensed under the MIT License (the "License"); you may not use this file
* except in compliance with the License.
*
* The only warranties for products and services of Open Text and its affiliates
* and licensors ("Open Text") are as may be set forth in the express warranty
* statements accompanying such products and services. Nothing herein should be
* construed as constituting an additional warranty. Open Text shall not be
* liable for technical or editorial errors or omissions contained herein. The
* information contained herein is subject to change without notice.
*/
package com.autonomy.aci.client.annotations;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
class StringToByteConverter implements Converter {
private static final Logger LOGGER = LoggerFactory.getLogger(StringToByteConverter.class);
@Override
public Byte convert(final String in) {
try {
return Byte.valueOf(in);
} catch (final NumberFormatException e) {
LOGGER.warn("Cannot convert \"{}\", returning 0", in);
return 0x00;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy