
com.xxdb.data.SymbolBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dolphindb-javaapi Show documentation
Show all versions of dolphindb-javaapi Show documentation
The messaging and data conversion protocol between Java and DolphinDB server
package com.xxdb.data;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import com.xxdb.io.ExtendedDataInput;
import com.xxdb.io.ExtendedDataOutput;
public class SymbolBase {
private ArrayList syms = new ArrayList();
private Map symMap = null;
private int id;
public SymbolBase(int id) {
this.id = id;
}
public SymbolBase(ExtendedDataInput in) throws IOException{
this(in.readInt(), in);
}
public SymbolBase(int id, ExtendedDataInput in) throws IOException{
this.id = id;
int size = in.readInt();
for(int i=0; i();
if(syms.size() > 0 && !syms.get(0).isEmpty())
throw new RuntimeException("A symbol base's first key must be empty string.");
if(syms.size() == 0){
symMap.put("", 0);
syms.add("");
}
else{
int count = syms.size();
for(int i=0; i();
if(syms.size() > 0 && !syms.get(0).isEmpty())
throw new RuntimeException("A symbol base's first key must be empty string.");
if(syms.size() == 0){
symMap.put("", 0);
syms.add("");
}
else{
int count = syms.size();
for(int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy