public int getInt1_2_4Bytes(FieldBase field) { return buf.getInt1_2_4Bytes(); } public long getInt2_4_8Bytes(FieldBase field) { return buf.getInt2_4_8Bytes(); }
private List<SpanNode> readSpanList(SpanNodeParent parent) { int size = buf.getInt1_2_4Bytes(); List<SpanNode> spanList = new ArrayList<SpanNode>(); for (int i = 0; i < size; i++) { spanList.add(readSpanNode()); } return spanList; }
private List<SpanNode> readSpanList(SpanNodeParent parent) { int size = buf.getInt1_2_4Bytes(); List<SpanNode> spanList = new ArrayList<SpanNode>(); for (int i = 0; i < size; i++) { spanList.add(readSpanNode()); } return spanList; }
public void read(FieldBase field, AnnotationReference value) { int seqId = buf.getInt1_2_4Bytes(); try { Annotation a = annotations.get(seqId); value.setReferenceNoCompatibilityCheck(a); } catch (IndexOutOfBoundsException iiobe) { throw new SerializationException("Could not serialize AnnotationReference value, reference not found.", iiobe); } }
public void read(FieldBase field, AnnotationReference value) { int seqId = buf.getInt1_2_4Bytes(); try { Annotation a = annotations.get(seqId); value.setReferenceNoCompatibilityCheck(a); } catch (IndexOutOfBoundsException iiobe) { throw new SerializationException("Could not serialize AnnotationReference value, reference not found.", iiobe); } }
public void read(Span span) { byte type = buf.get(); if ((type & Span.ID) != Span.ID) { throw new DeserializationException("Cannot deserialize Span with type " + type); } span.setFrom(buf.getInt1_2_4Bytes()); span.setLength(buf.getInt1_2_4Bytes()); }
public void read(Span span) { byte type = buf.get(); if ((type & Span.ID) != Span.ID) { throw new DeserializationException("Cannot deserialize Span with type " + type); } span.setFrom(buf.getInt1_2_4Bytes()); span.setLength(buf.getInt1_2_4Bytes()); }
tree.setRoot(root); int numAnnotations = buf.getInt1_2_4Bytes();
tree.setRoot(root); int numAnnotations = buf.getInt1_2_4Bytes();
public void read(AlternateSpanList altSpanList) { byte type = buf.get(); if ((type & AlternateSpanList.ID) != AlternateSpanList.ID) { throw new DeserializationException("Cannot deserialize AlternateSpanList with type " + type); } int numSubTrees = buf.getInt1_2_4Bytes(); for (int i = 0; i < numSubTrees; i++) { double prob = buf.getDouble(); List<SpanNode> list = readSpanList(altSpanList); if (i == 0) { for (SpanNode node : list) { altSpanList.add(node); } altSpanList.setProbability(0, prob); } else { altSpanList.addChildren(i, list, prob); } } }
public void read(AlternateSpanList altSpanList) { byte type = buf.get(); if ((type & AlternateSpanList.ID) != AlternateSpanList.ID) { throw new DeserializationException("Cannot deserialize AlternateSpanList with type " + type); } int numSubTrees = buf.getInt1_2_4Bytes(); for (int i = 0; i < numSubTrees; i++) { double prob = buf.getDouble(); List<SpanNode> list = readSpanList(altSpanList); if (i == 0) { for (SpanNode node : list) { altSpanList.add(node); } altSpanList.setProbability(0, prob); } else { altSpanList.addChildren(i, list, prob); } } }
int length = buf.getInt1_2_4Bytes(); int spanNodeId = buf.getInt1_2_4Bytes(); try { SpanNode node = spanNodes.get(spanNodeId);
int length = buf.getInt1_2_4Bytes(); int spanNodeId = buf.getInt1_2_4Bytes(); try { SpanNode node = spanNodes.get(spanNodeId);
int startPos = buf.position(); int numSpanTrees = buf.getInt1_2_4Bytes();
int startPos = buf.position(); int numSpanTrees = buf.getInt1_2_4Bytes();