Module org.refcodes.serial
Package org.refcodes.serial
Interface PacketMagicBytesAccessor.PacketMagicBytesBuilder<B extends PacketMagicBytesAccessor.PacketMagicBytesBuilder<B>>
- Type Parameters:
B- The builder to return in order to be able to apply multiple build operations.
- All Known Implementing Classes:
PacketInputStream.Builder,PacketOutputStream.Builder,StopAndWaitPacketInputStream.Builder,StopAndWaitPacketOutputStream.Builder,StopAndWaitPacketStreamSectionDecorator.Builder,StopAndWaitPacketStreamSegmentDecorator.Builder,TransmissionMetrics.Builder
- Enclosing interface:
- PacketMagicBytesAccessor
public static interface PacketMagicBytesAccessor.PacketMagicBytesBuilder<B extends PacketMagicBytesAccessor.PacketMagicBytesBuilder<B>>
Provides a builder method for a packet magic bytes property returning the
builder for applying multiple build operations.
-
Method Summary
Modifier and TypeMethodDescriptionwithPacketMagicBytes(byte[] aPacketMagicBytes) Sets the magic bytes for the packet magic bytes property.default BwithPacketMagicBytes(String aPacketMagicBytes) Sets the magic bytes for the packet magic bytes property.default BwithPacketMagicBytes(String aPacketMagicBytes, Charset aEncoding) Sets the magic bytes for the packet magic bytes property.
-
Method Details
-
withPacketMagicBytes
Sets the magic bytes for the packet magic bytes property.- Parameters:
aPacketMagicBytes- The magic bytes to be stored by the packet magic bytes property.- Returns:
- The builder for applying multiple build operations.
-
withPacketMagicBytes
Sets the magic bytes for the packet magic bytes property.- Parameters:
aPacketMagicBytes- The magic bytes to be stored by the magic bytes property. UsesTransmissionMetrics.DEFAULT_ENCODINGfor converting theStringinto a byte array.- Returns:
- the b
-
withPacketMagicBytes
Sets the magic bytes for the packet magic bytes property.- Parameters:
aPacketMagicBytes- 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.
-