org.opensearch.migrations.trafficcapture.CodedOutputStreamAndByteBufferWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of captureOffloader Show documentation
Show all versions of captureOffloader Show documentation
Everything opensearch migrations
package org.opensearch.migrations.trafficcapture;
import java.nio.ByteBuffer;
import com.google.protobuf.CodedOutputStream;
import lombok.Getter;
import lombok.NonNull;
@Getter
public class CodedOutputStreamAndByteBufferWrapper implements CodedOutputStreamHolder {
@NonNull
private final CodedOutputStream outputStream;
@NonNull
private final ByteBuffer byteBuffer;
public CodedOutputStreamAndByteBufferWrapper(int bufferSize) {
this.byteBuffer = ByteBuffer.allocate(bufferSize);
outputStream = CodedOutputStream.newInstance(byteBuffer);
}
public int getOutputStreamBytesLimit() {
return byteBuffer.limit();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy