All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xxdb.data.BasicLongVector Maven / Gradle / Ivy

Go to download

The messaging and data conversion protocol between Java and DolphinDB server

There is a newer version: 1.0.27
Show newest version
package com.xxdb.data;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.List;

import com.xxdb.io.ExtendedDataInput;
import com.xxdb.io.ExtendedDataOutput;

/**
 * 
 * Corresponds to DolphinDB long vector
 *
 */

public class BasicLongVector extends AbstractVector{
	private long[] values;
	
	public BasicLongVector(int size){
		this(DATA_FORM.DF_VECTOR, size);
	}
	
	public BasicLongVector(List list){
		super(DATA_FORM.DF_VECTOR);
		if (list != null) {
			values = new long[list.size()];
			for (int i=0; i getElementClass(){
		return BasicLong.class;
	}

	protected void writeVectorToOutputStream(ExtendedDataOutput out) throws IOException{
		out.writeLongArray(values);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy