public interface BaseBuilder extends BaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<BaseBuilder>
BaseBuilder
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 BaseBuilder
makes use of
the utility-Builder-Pattern and is designed to support codes starting with
Base2 till Base64 and further up.BaseMetricsAccessor.BaseCodecMetricsProperty, BaseMetricsAccessor.BaseMetricsBuilder<B extends BaseMetricsAccessor.BaseMetricsBuilder<B>>, BaseMetricsAccessor.BaseMetricsMutator
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 |
setBaseMetrics(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 BaseBuilder |
withBaseMetrics(BaseMetrics aBaseMetricsCodec)
Sets the base codec metrics for the base codec metrics property.
|
default BaseBuilder |
withBaseMetrics(int aNumberBase)
Sets the number base for the number base property.
|
default BaseBuilder |
withDecodedData(byte[] aDecodedData)
Sets the decoded data for the decoded data property.
|
default BaseBuilder |
withDecodedData(long aDecodedData)
Sets the decoded data for the decoded data property.
|
default BaseBuilder |
withEncodedText(String aEncodedText)
Sets the encoded text for the encoded text property.
|
getBaseMetrics
setBaseMetrics
default BaseBuilder withBaseMetrics(BaseMetrics aBaseMetricsCodec)
BaseMetricsAccessor.BaseMetricsBuilder
withBaseMetrics
in interface BaseMetricsAccessor.BaseMetricsBuilder<BaseBuilder>
aBaseMetricsCodec
- The base codec metrics to be stored by the font
style property.default void setBaseMetrics(int aNumberBase)
aNumberBase
- The number base to be stored by the base codec metrics
property.default BaseBuilder withBaseMetrics(int aNumberBase)
aNumberBase
- The number base to be stored by the base codec metrics
property.String getEncodedText()
String toEncodedText(byte[] aDecodedData)
BaseMetrics
via withBaseMetrics(BaseMetrics)
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)
BaseMetrics
via withBaseMetrics(BaseMetrics)
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 BaseBuilder withEncodedText(String aEncodedText)
aEncodedText
- The encoded text to be stored by the encoded text
property.byte[] getDecodedData()
byte[] toDecodedData(String aEncodedText)
BaseMetrics
via withBaseMetrics(BaseMetrics)
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 BaseBuilder withDecodedData(byte[] aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.default BaseBuilder withDecodedData(long aDecodedData)
aDecodedData
- The decoded data to be stored by the decoded data
property.Copyright © 2017. All rights reserved.