public abstract class ByteArrayDecoder extends Object
This class is an interface for new Decoders (e.g. org.sw4j.tool.barcode.random.encoder.impl.Base58Decoder)
and a factory for such decoders.
| Constructor and Description |
|---|
ByteArrayDecoder() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
decode(String data)
Decode the given data into the encoding that is supported by the encoder.
|
static ByteArrayDecoder |
forEncoding(String encoding)
Return an decoder for the given encoding (e.g.
|
abstract boolean |
supports(String encoding)
For concrete decoders this method should return
true if the given encoding is supported. |
public abstract boolean supports(String encoding)
For concrete decoders this method should return true if the given encoding is supported.
encoding - the encoding to check for.true if the encoding is supported by the decoder.public abstract byte[] decode(String data)
Decode the given data into the encoding that is supported by the encoder.
data - the data to decode.public static ByteArrayDecoder forEncoding(String encoding)
Return an decoder for the given encoding (e.g. base58).
encoding - the encoding for which an decoder should be created.null if no decoder is available.Copyright © 2020 sw4j.org. All rights reserved.