Here you can find the source of readByteVector8(ByteBuffer input)
static String readByteVector8(ByteBuffer input)
//package com.java2s; //License from project: Open Source License import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; public class Main { static String readByteVector8(ByteBuffer input) { int length = getInt8(input); byte[] data = new byte[length]; input.get(data);//from w w w.j a v a 2 s . co m return new String(data, StandardCharsets.US_ASCII); } static int getInt8(ByteBuffer input) { return input.get(); } }