Java ByteBuffer Read readVL(ByteBuffer byteBuffer)

Here you can find the source of readVL(ByteBuffer byteBuffer)

Description

read VL

License

Open Source License

Declaration

public static List<Long> readVL(ByteBuffer byteBuffer) 

Method Source Code


//package com.java2s;
/*//from   ww  w  . j a  v a2s  .  com
 * (C) 2007-2010 Alibaba Group Holding Limited.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

import java.nio.ByteBuffer;
import java.util.List;
import java.util.ArrayList;

public class Main {
    public static List<Long> readVL(ByteBuffer byteBuffer) {
        List<Long> ret = new ArrayList<Long>();
        // get vector's length
        int size = byteBuffer.getInt();
        for (int i = 0; i < size; ++i) {
            ret.add(byteBuffer.getLong());
        }
        return ret;
    }
}

Related

  1. readTs(ByteBuffer is, int c)
  2. readUUID(ByteBuffer buffer)
  3. readVariableLength(ByteBuffer buf)
  4. readVInt(ByteBuffer bb)
  5. readVInt(ByteBuffer bb)
  6. readZeroTermStr(ByteBuffer bb)