io.rsocket.buffer.TupleByteBuf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rsocket-core Show documentation
Show all versions of rsocket-core Show documentation
Core functionality for the RSocket library
package io.rsocket.buffer;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import java.util.Objects;
public abstract class TupleByteBuf {
private TupleByteBuf() {}
public static ByteBuf of(ByteBuf one, ByteBuf two) {
return of(ByteBufAllocator.DEFAULT, one, two);
}
public static ByteBuf of(ByteBufAllocator allocator, ByteBuf one, ByteBuf two) {
Objects.requireNonNull(allocator);
Objects.requireNonNull(one);
Objects.requireNonNull(two);
return new Tuple2ByteBuf(allocator, one, two);
}
public static ByteBuf of(ByteBuf one, ByteBuf two, ByteBuf three) {
return of(ByteBufAllocator.DEFAULT, one, two, three);
}
public static ByteBuf of(ByteBufAllocator allocator, ByteBuf one, ByteBuf two, ByteBuf three) {
Objects.requireNonNull(allocator);
Objects.requireNonNull(one);
Objects.requireNonNull(two);
Objects.requireNonNull(three);
return new Tuple3ByteBuf(allocator, one, two, three);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy