Java ByteBuffer Clear clearAll(ByteBuffer[] buffers)

Here you can find the source of clearAll(ByteBuffer[] buffers)

Description

Convenience method to clear array of buffers.

License

Apache License

Exception

Parameter Description
NullPointerException if <tt>buffer</tt> or any of its elements is <tt>null</tt>

Declaration

public static void clearAll(ByteBuffer[] buffers) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.nio.ByteBuffer;

public class Main {
    /**/*from  ww w.java 2  s . c om*/
     * Convenience method to clear array of <tt>buffers</tt>.
     * 
     * @throws NullPointerException
     *         if <tt>buffer</tt> or any of its elements is <tt>null</tt>
     */
    public static void clearAll(ByteBuffer[] buffers) {
        for (int i = buffers.length; i-- > 0;)
            buffers[i].clear();
    }
}

Related

  1. clear(ByteBuffer b)
  2. clear(ByteBuffer buffer)
  3. clear(ByteBuffer buffer, int position, int length, byte filler)
  4. clear(ByteBuffer[] buffers)
  5. clearAndEnsureCapacity(ByteBuffer buffer, int elements)
  6. clearRemaining(ByteBuffer buffer)
  7. clearRemainingFrame(ByteBuffer buffer, int position)
  8. clearString(ByteBuffer buffer)