Search in sources :

Example 1 with IntList

use of com.amazon.ion.impl.bin.IntList in project ion-java by amzn.

the class IonReaderBinaryIncremental method getTypeAnnotationSymbols.

@Override
public SymbolToken[] getTypeAnnotationSymbols() {
    if (hasAnnotations) {
        IntList annotationSids = getAnnotationSids();
        SymbolToken[] annotationArray = new SymbolToken[annotationSids.size()];
        for (int i = 0; i < annotationArray.length; i++) {
            annotationArray[i] = getSymbolToken(annotationSids.get(i));
        }
        return annotationArray;
    }
    return SymbolToken.EMPTY_ARRAY;
}
Also used : SymbolToken(com.amazon.ion.SymbolToken) IntList(com.amazon.ion.impl.bin.IntList)

Example 2 with IntList

use of com.amazon.ion.impl.bin.IntList in project ion-java by amzn.

the class IonReaderBinaryIncremental method getTypeAnnotations.

@Override
public String[] getTypeAnnotations() {
    if (hasAnnotations) {
        IntList annotationSids = getAnnotationSids();
        String[] annotationArray = new String[annotationSids.size()];
        for (int i = 0; i < annotationArray.length; i++) {
            String symbol = getSymbol(annotationSids.get(i));
            if (symbol == null) {
                throw new UnknownSymbolException(annotationSids.get(i));
            }
            annotationArray[i] = symbol;
        }
        return annotationArray;
    }
    return _Private_Utils.EMPTY_STRING_ARRAY;
}
Also used : UnknownSymbolException(com.amazon.ion.UnknownSymbolException) IntList(com.amazon.ion.impl.bin.IntList)

Aggregations

IntList (com.amazon.ion.impl.bin.IntList)2 SymbolToken (com.amazon.ion.SymbolToken)1 UnknownSymbolException (com.amazon.ion.UnknownSymbolException)1