Here you can find the source of printBuffer(ByteBuffer buffer)
Parameter | Description |
---|---|
buffer | the buffer to print |
public static void printBuffer(ByteBuffer buffer)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; public class Main { /**/*ww w .j a v a 2 s . c om*/ * Prints the given buffer in hex format from the 0 position to the limit. * * @param buffer the buffer to print */ public static void printBuffer(ByteBuffer buffer) { for (int i = 0; i < buffer.limit(); i++) { System.out.format("%x ", buffer.get(i)); } } }