public interface BaseCodecBuilder extends BaseCodecMetricsAccessor.BaseCodecMetricsProperty, BaseCodecMetricsAccessor.BaseCodecMetricsBuilder<BaseCodecBuilder>
BaseCodecBuilder
provides the functionality to do base encoding
and decoding such as done by the Base64 encoding and decoding functionality
(see "https://en.wikipedia.org/wiki/Base64"). The BaseCodecBuilder
makes use of the utility-builder pattern and is designed to support codes
starting with Base2 till Base64 and further up.BaseCodecMetricsAccessor.BaseCodecMetricsBuilder<B extends BaseCodecMetricsAccessor.BaseCodecMetricsBuilder<B>>, BaseCodecMetricsAccessor.BaseCodecMetricsMutator, BaseCodecMetricsAccessor.BaseCodecMetricsProperty
Modifier and Type | Method and Description |
---|---|
byte[] |
getDecodedData()
Retrieves the decoded data from the decoded data property.
|
String |
getEncodedText()
Retrieves the encoded text from the encoded text property.
|
default void |
setBaseCodecMetrics(int aNumberBase)
Sets the number base for the number base property.
|
void |
setDecodedData(byte[] aDecodedData)
Sets the decoded data for the decoded data property.
|
void |
setDecodedData(long aDecodedData)
Sets the decoded data for the decoded data property.
|
void |
setEncodedText(String aEncodedText)
Sets the encoded text for the encoded text property.
|
byte[] |
toDecodedData(String aEncodedText)
Retrieves the decoded data calculated from the provided encoded text.
|
String |
toEncodedText(byte[] aDecodedData)
Retrieves the encoded text calculated from the decoded data.
|
String |
toEncodedText(long aDecodedData)
Retrieves the encoded text calculated from the decoded data.
|
default BaseCodecBuilder |
withBaseCodecMetrics(BaseCodecMetrics aBaseMetricsCodec)
Sets the base codec metrics for the base codec metrics property.
|
default BaseCodecBuilder |
withBaseCodecMetrics(int aNumberBase)
Sets the number base for the number base property.
|
default BaseCodecBuilder |
withDecodedData(byte[] aDecodedData)
Sets the decoded data for the decoded data property.
|
default BaseCodecBuilder |
withDecodedData(long aDecodedData)
Sets the decoded data for the decoded data property.
|
default BaseCodecBuilder |
withEncodedText(String aEncodedText)
Sets the encoded text for the encoded text property.
|
getBaseCodecMetrics
setBaseCodecMetrics
default BaseCodecBuilder withBaseCodecMetrics(BaseCodecMetrics aBaseMetricsCodec)
BaseCodecMetricsAccessor.BaseCodecMetricsBuilder
withBaseCodecMetrics
in interface BaseCodecMetricsAccessor.BaseCodecMetricsBuilder<BaseCodecBuilder>
aBaseMetricsCodec
- The base codec metrics to be stored by the
font style property.default void setBaseCodecMetrics(int aNumberBase)
aNumberBase
- The number base to be stored by the base codec metrics
property.default BaseCodecBuilder withBaseCodecMetrics(int aNumberBase)
aNumberBase
- The number base to be stored by the base codec metrics
property.String getEncodedText()
String toEncodedText(byte[] aDecodedData)
BaseCodecMetrics
via
withBaseCodecMetrics(BaseCodecMetrics)
can cause side effects!
For avoiding thread race conditions / side effects regarding the decoded
data (and the encoded result), use this method instead of the combination
of withDecodedData(byte[])
with getEncodedText()
aDecodedData
- The decoded data to be encoded.String toEncodedText(long aDecodedData)
BaseCodecMetrics
via
withBaseCodecMetrics(BaseCodecMetrics)
can cause side effects!
For avoiding thread race conditions / side effects regarding the decoded
data (and the encoded result), use this method instead of the combination
of withDecodedData(byte[])
with getEncodedText()
aDecodedData
- The decoded data to be encoded.void setEncodedText(String aEncodedText)
aEncodedText
- The encoded text to be stored by the encoded text
property.default BaseCodecBuilder withEncodedText(String aEncodedText)
aEncodedText
- The encoded text to be stored by the encoded text
property.byte[] getDecodedData()
byte[] toDecodedData(String aEncodedText)
BaseCodecMetrics
via
withBaseCodecMetrics(BaseCodecMetrics)
can cause side effects!
For avoiding thread race conditions / side effects regarding the encoded
text (and the decoded result), use this method instead of the combination
of withEncodedText(String)
with getDecodedData()
.aEncodedText
- The encoded text to be decoded.void setDecodedData(byte[] aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.void setDecodedData(long aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.default BaseCodecBuilder withDecodedData(byte[] aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.default BaseCodecBuilder withDecodedData(long aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.Copyright © 2017. All rights reserved.