Module org.refcodes.mixin
Package org.refcodes.mixin
Interface MagicBytesAccessor.MagicBytesBuilder<B extends MagicBytesAccessor.MagicBytesBuilder<B>>
- Type Parameters:
B
- The builder to return in order to be able to apply multiple build operations.
- Enclosing interface:
- MagicBytesAccessor
public static interface MagicBytesAccessor.MagicBytesBuilder<B extends MagicBytesAccessor.MagicBytesBuilder<B>>
Provides a builder method for a magic bytes property returning the
builder for applying multiple build operations.
-
Method Summary
Modifier and TypeMethodDescriptionwithMagicBytes
(byte[] aMagicBytes) Sets the magic bytes for the magic bytes property.default B
withMagicBytes
(String aMagicBytes) Sets the magic bytes for the magic bytes property.default B
withMagicBytes
(String aMagicBytes, Charset aEncoding) Sets the magic bytes for the magic bytes property.
-
Method Details
-
withMagicBytes
Sets the magic bytes for the magic bytes property.- Parameters:
aMagicBytes
- The magic bytes to be stored by the magic bytes property.- Returns:
- The builder for applying multiple build operations.
-
withMagicBytes
Sets the magic bytes for the magic bytes property. If not stated otherwise, theString
is converted using the platform encoding into an array of bytes.- Parameters:
aMagicBytes
- The magic bytes to be stored by the magic bytes property.- Returns:
- The builder for applying multiple build operations.
-
withMagicBytes
Sets the magic bytes for the magic bytes property.- Parameters:
aMagicBytes
- The magic bytes to be stored by the magic bytes property.aEncoding
- The string's bytes are converted using the givenCharset
.- Returns:
- The builder for applying multiple build operations.
-