public class Base64Decoder extends Object implements Decoder
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
Base64Decoder(int decodedBytesPerLine,
int extraSpaceAfterEvery)
Construct a new Base64Decoder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
append(int address,
byte theByte)
Decode one (more) byte.
|
int |
getMaximumWidth()
Retrieve the maximum width (in characters) of results that this Decoder can return (all shorter results will be padded to
this width with spaces, unless this is the last active Decoder).
|
String |
getResult()
Retrieve the current result of this Decoder.
|
boolean |
ignoreForIdenticalOutputCheck()
If the result of this Decoder should not be used to compare output lines for suppressing identical lines, this method
should return true; otherwise it should return false;
|
public Base64Decoder(int decodedBytesPerLine, int extraSpaceAfterEvery)
decodedBytesPerLine
- int; maximum number of decoded input characters resulting in one output lineextraSpaceAfterEvery
- int; insert an extra space after every N output fields (a multiple of 3 makes sense for the
base64 decoder because base64 encodes three bytes into 4 characters)public String getResult()
public int getMaximumWidth()
getMaximumWidth
in interface Decoder
public boolean append(int address, byte theByte) throws IOException
append
in interface Decoder
address
- int; the address that corresponds with the bytetheByte
- byte; the byteIOException
- when the output device throws this exceptionpublic boolean ignoreForIdenticalOutputCheck()
ignoreForIdenticalOutputCheck
in interface Decoder
Copyright © 2018–2019 Delft University of Technology. All rights reserved.