Java ByteBuffer Dump dump(ByteBuffer buffer)

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

Description

dump

License

Open Source License

Declaration

public static void dump(ByteBuffer buffer) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    public static void dump(ByteBuffer buffer) {
        ByteBuffer dup = buffer.duplicate();
        byte[] bs = new byte[dup.position()];
        dup.flip();//from  w  w w . j  av  a 2s  .c om
        dup.get(bs);
        System.out.println(new String(bs));
    }
}

Related

  1. bbdump(ByteBuffer sbb)
  2. dump(ByteBuffer bb)
  3. dump(ByteBuffer buff, int size, boolean asBits)
  4. dump(ByteBuffer buffer)
  5. dump(ByteBuffer buffer, int pos, int limit)
  6. dump(ByteBuffer buffer, OutputStream stream)
  7. dumpAsHex(byte[] byteBuffer, int length)
  8. dumpBoolean(ByteBuffer itemBuffer, StringBuilder sb, String tag)