Package org.djutils.serialization
Class SerialDataDecoder
java.lang.Object
org.djutils.serialization.SerialDataDecoder
- All Implemented Interfaces:
Decoder
Decoder for inspection of serialized data. The SerialDataDecoder implements a state machine that processes one byte at a
time. Output is sent to the buffer (a StringBuilder).
Copyright (c) 2013-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Constructor Details
-
SerialDataDecoder
Construct a new SerialDataDecoder.- Parameters:
endianness- the endian util to use to decode multi-byte values
-
-
Method Details
-
getResult
-
getMaximumWidth
public final int getMaximumWidth()- Specified by:
getMaximumWidthin interfaceDecoder
-
append
Decode one (more) byte. This method must return true when a line becomes full due to this call, otherwise this method must return false.- Specified by:
appendin interfaceDecoder- Parameters:
address- the address that corresponds with the byte, for printing purposes.theByte- the byte to process- Returns:
- true if an output line has been completed by this call; false if at least one more byte can be appended to the local accumulator before the current output line is full
- Throws:
IOException- when the output device throws this exception
-
ignoreForIdenticalOutputCheck
public final boolean ignoreForIdenticalOutputCheck()- Specified by:
ignoreForIdenticalOutputCheckin interfaceDecoder
-