Class ChannelByteRanger

java.lang.Object
io.activej.csp.process.AbstractCommunicatingProcess
io.activej.csp.process.AbstractChannelTransformer<ChannelByteRanger,io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>
io.activej.csp.process.ChannelByteRanger
All Implemented Interfaces:
io.activej.async.process.AsyncCloseable, io.activej.async.process.AsyncProcess, ChannelConsumerTransformer<io.activej.bytebuf.ByteBuf,ChannelConsumer<io.activej.bytebuf.ByteBuf>>, ChannelSupplierTransformer<io.activej.bytebuf.ByteBuf,ChannelSupplier<io.activej.bytebuf.ByteBuf>>, ChannelTransformer<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>, HasChannelInput<io.activej.bytebuf.ByteBuf>, HasChannelOutput<io.activej.bytebuf.ByteBuf>, WithChannelInput<ChannelByteRanger,io.activej.bytebuf.ByteBuf>, WithChannelOutput<ChannelByteRanger,io.activej.bytebuf.ByteBuf>, WithChannelTransformer<ChannelByteRanger,io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>

public final class ChannelByteRanger extends AbstractChannelTransformer<ChannelByteRanger,io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>
Drops exactly N bytes from a csp stream of byte buffers and limits that stream to exactly M bytes in length
  • Method Details

    • range

      public static ChannelTransformer<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf> range(long offset, long length)
    • drop

      public static ChannelTransformer<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf> drop(long toDrop)
    • limit

      public static ChannelTransformer<io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf> limit(long limit)
    • onItem

      @NotNull protected @NotNull io.activej.promise.Promise<Void> onItem(io.activej.bytebuf.ByteBuf item)
      Specified by:
      onItem in class AbstractChannelTransformer<ChannelByteRanger,io.activej.bytebuf.ByteBuf,io.activej.bytebuf.ByteBuf>