package org.djutils.data.serialization; /** * ByteSerializer (de)serializes Byte objects.
*
* Copyright (c) 2020-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information https://djutils.org. The DJUTILS project is * distributed under a three-clause BSD-style license, which can be found at * https://djutils.org/docs/license.html.
* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel */ public class ByteSerializer implements TextSerializer { /** {@inheritDoc} */ @Override public String serialize(final Object value) { return String.valueOf(((Byte) value).byteValue()); } /** {@inheritDoc} */ @Override public Byte deserialize(final String text) { return Byte.valueOf(text); } }