Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZeroBuffer

        public ZeroBuffer()
    • 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