Java ByteBuffer to String asStr(ByteBuffer buff)

Here you can find the source of asStr(ByteBuffer buff)

Description

as Str

License

Apache License

Declaration

public static String asStr(ByteBuffer buff) 

Method Source Code

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

import java.nio.ByteBuffer;

public class Main {
    public static String asStr(ByteBuffer buff) {
        return new String(buff.array(), buff.arrayOffset() + buff.position(), buff.limit());
    }//w w  w . ja v  a2  s.com
}

Related

  1. asString(ByteBuffer buffer, int length)
  2. asString(final ByteBuffer buffer)
  3. asString(Map headers)
  4. bbToString(ByteBuffer bb)