Package org.apache.bookkeeper.util
Class ZeroBuffer
- java.lang.Object
-
- org.apache.bookkeeper.util.ZeroBuffer
-
public class ZeroBuffer extends java.lang.Object
Zero buffer utility.
-
-
Constructor Summary
Constructors Constructor Description ZeroBuffer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
put(java.nio.ByteBuffer dst)
Fill zeros into given buffer.static void
put(java.nio.ByteBuffer dst, int length)
Fill zeros into given buffer up to given length.static java.nio.ByteBuffer
readOnlyBuffer(int length)
Returns read-only zero-filled buffer.
-
-
-
Method Detail
-
put
public static void put(java.nio.ByteBuffer dst)
Fill zeros into given buffer.- Parameters:
dst
-
-
put
public static void put(java.nio.ByteBuffer dst, int length)
Fill zeros into given buffer up to given length.- Parameters:
dst
-length
-
-
readOnlyBuffer
public static java.nio.ByteBuffer readOnlyBuffer(int length)
Returns read-only zero-filled buffer.- Parameters:
length
-- Returns:
- ByteBuffer
-
-