Here you can find the source of decodeIO(String encoding, ByteBuffer bbuf)
private static String decodeIO(String encoding, ByteBuffer bbuf) throws UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.*; import java.nio.ByteBuffer; public class Main { private static String decodeIO(String encoding, ByteBuffer bbuf) throws UnsupportedEncodingException { if (bbuf.hasArray()) return new String(bbuf.array(), encoding); throw new IllegalArgumentException(); }/* ww w . j av a 2 s . c om*/ }