Java ByteBuffer Print printBuffer(ByteBuffer buffer)

Here you can find the source of printBuffer(ByteBuffer buffer)

Description

print Buffer

License

Open Source License

Declaration

public static void printBuffer(ByteBuffer buffer) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.nio.ByteBuffer;

import java.util.Arrays;

public class Main {
    public static void printBuffer(ByteBuffer buffer) {
        byte[] bytes = new byte[buffer.remaining()];
        buffer.get(bytes);//from w w w . ja va  2s .  co m
        System.out.println(Arrays.toString(bytes));
    }
}

Related

  1. print(ByteBuffer bb)
  2. print(ByteBuffer byteBuffer)
  3. printBuffer(ByteBuffer buffer)
  4. printBuffer(String msg, ByteBuffer buffer)
  5. printByteBuffer(ByteBuffer buf)
  6. printData(ByteBuffer buf, int offset, int len)