Uses of Class
io.activej.bytebuf.ByteBuf
Packages that use ByteBuf
-
Uses of ByteBuf in io.activej.bytebuf
Methods in io.activej.bytebuf that return ByteBufModifier and TypeMethodDescriptionstatic @NotNull ByteBufByteBufPool.allocate(int size) Allocates byte buffer from the pool with size ofceil(log2(size))2(rounds up to the nearest power of 2) bytes.static @NotNull ByteBufstatic @NotNull ByteBufByteBufPool.allocateExact(int size) Allocates byte buffer in the same way asByteBufPool.allocate(int)does, but sets its positions so that write-remaining is equal to requested size.static @NotNull ByteBufByteBufPool.allocateExact(@NotNull MemSize size) static @NotNull ByteBufstatic @NotNull ByteBufAppends byte array to ByteBuf.static @NotNull ByteBufAppends one ByteBuf to another ByteBuf.static ByteBufByteBuf.empty()Creates an emptyByteBufwith array of size 0,tailandheadboth equal to 0.static @NotNull ByteBufByteBufPool.ensureWriteRemaining(@NotNull ByteBuf buf, int newWriteRemaining) static @NotNull ByteBufByteBufPool.ensureWriteRemaining(@NotNull ByteBuf buf, int minSize, int newWriteRemaining) Checks if current ByteBuf can accommodate the needed amount of writable bytes.@NotNull ByteBufByteBufs.ByteBufIterator.next()ByteBufs.peekBuf()Returns the first ByteBuf of this queue if the queue is not empty.@NotNull ByteBufByteBufs.peekBuf(int n) Returns the ByteBuf of the given index relatively to thefirstindex (head) of the queue.@Nullable ByteBufByteBufs.poll()Returns the first ByteBuf of the queue if the queue is not empty otherwise returnsnull.@NotNull ByteBufByteBuf.slice()Creates a slice of thisByteBufif it is not recycled.@NotNull ByteBufByteBuf.slice(int length) Creates a slice of thisByteBufwith the given length if it is not recycled.@NotNull ByteBufByteBuf.slice(int offset, int length) Creates a slice of thisByteBufwith the given offset and length.@NotNull ByteBufByteBufs.take()Returns the first ByteBuf of the queue if the queue is not empty.@NotNull ByteBufByteBufs.takeAtLeast(int size) Creates and returns a ByteBuf which contains at leastsizebytes from queue's first ByteBuf if the latter contains enough bytes.@NotNull ByteBufByteBufs.takeAtLeast(int size, @NotNull Consumer<ByteBuf> recycledBufs) @NotNull ByteBufByteBufs.takeAtMost(int size) Creates and returns aByteBuf.ByteBufSlicewhich containssizebytes from queue's first ByteBuf if the latter contains too many bytes.@NotNull ByteBufByteBufs.takeExactSize(int exactSize) Creates and returns a ByteBuf which contains all bytes from the queue's first ByteBuf if the latter containsexactSizeof bytes.@NotNull ByteBufByteBufs.takeExactSize(int exactSize, @NotNull Consumer<ByteBuf> recycledBufs) @NotNull ByteBufByteBufs.takeRemaining()Creates and returns a ByteBuf with all remaining bytes of the queue.static @NotNull ByteBufByteBuf.wrap(byte[] bytes, int head, int tail) Wraps provided byte array intoByteBufwith specifiedtailandhead.static ByteBufstatic @NotNull ByteBufByteBuf.wrapForReading(byte[] bytes) Wraps provided byte array intoByteBufwithtailequal to length of provided array.static @NotNull ByteBufByteBuf.wrapForWriting(byte[] bytes) Wraps provided byte array intoByteBufwithtailequal to 0.static ByteBufByteBufStrings.wrapInt(int value) static ByteBufByteBufStrings.wrapLong(long value) static ByteBufMethods in io.activej.bytebuf that return types with arguments of type ByteBufModifier and TypeMethodDescriptionByteBufs.asIterator()ByteBufs.collector()ByteBufs.collector()ByteBufs.collector(int maxSize) ByteBufs.collector(int maxSize) ByteBufPool.ByteBufPoolStats.getUnrecycledBufs()Methods in io.activej.bytebuf with parameters of type ByteBufModifier and TypeMethodDescriptionvoidAdds provided ByteBuf to this ByteBufs.static @NotNull ByteBufstatic @NotNull ByteBufAppends byte array to ByteBuf.static @NotNull ByteBufAppends one ByteBuf to another ByteBuf.static Stringstatic Stringstatic StringByteBufStrings.decodeUtf8(ByteBuf buf) intDrains bytes to a givenByteBuf.intAdds as many bytes todestas it can store.intAddsmaxSizebytes from this queue to ByteBufdestif queue contains more thanmaxSizebytes.static @NotNull ByteBufByteBufPool.ensureWriteRemaining(@NotNull ByteBuf buf, int newWriteRemaining) static @NotNull ByteBufByteBufPool.ensureWriteRemaining(@NotNull ByteBuf buf, int minSize, int newWriteRemaining) Checks if current ByteBuf can accommodate the needed amount of writable bytes.static intstatic intByteBufStrings.hashCodeLowerCaseAscii(ByteBuf buf) static intByteBufStrings.hashCodeUpperCaseAscii(ByteBuf buf) booleanByteBuf.isContentEqual(@NotNull ByteBuf other) Checks if providedByteBufreadable bytes are equal to the readable bytes of thearray.voidPuts given ByteBuf to thisByteBuffrom thetailand increases thetailby the length of the given ByteBuf.static voidstatic voidstatic voidstatic voidByteBufStrings.putPositiveInt(ByteBuf buf, int value) static voidByteBufStrings.putPositiveLong(ByteBuf buf, long value) static voidstatic voidByteBufStrings.toLowerCaseAscii(ByteBuf buf) static voidByteBufStrings.toUpperCaseAscii(ByteBuf buf) Method parameters in io.activej.bytebuf with type arguments of type ByteBufModifier and TypeMethodDescriptionvoidvoidConsumes the first ByteBuf of the queue to the provided consumer if the ByteBuf has at leastsizebytes available for reading.intByteBufs.consumeBytes(int offset, ByteBufs.ByteScanner byteScanner, Consumer<ByteBuf> recycledBufs) intByteBufs.consumeBytes(ByteBufs.ByteScanner byteScanner, Consumer<ByteBuf> recycledBufs) intint@NotNull ByteBufByteBufs.takeAtLeast(int size, @NotNull Consumer<ByteBuf> recycledBufs) @NotNull ByteBufByteBufs.takeExactSize(int exactSize, @NotNull Consumer<ByteBuf> recycledBufs) -
Uses of ByteBuf in io.activej.bytebuf.util
Methods in io.activej.bytebuf.util that return ByteBuf