use of com.amazon.ion.IonValue in project ion-java by amzn.
the class IonWriterSystemTree method writeInt.
public void writeInt(BigInteger value) throws IOException {
IonValue v = _factory.newInt(value);
append(v);
}
use of com.amazon.ion.IonValue in project ion-java by amzn.
the class IonWriterSystemTree method writeInt.
public void writeInt(int value) throws IOException {
IonValue v = _factory.newInt(value);
append(v);
}
use of com.amazon.ion.IonValue in project ion-java by amzn.
the class IonWriterSystemTree method writeNull.
// ========================================================================
public void writeNull(IonType type) throws IOException {
IonValue v = _factory.newNull(type);
append(v);
}
use of com.amazon.ion.IonValue in project ion-java by amzn.
the class SymbolTableStructCache method addSymbol.
/**
* Adds a new symbol table with the given symbol ID to the IonStruct's 'symbols' list.
* @param symbolName can be null when there's a gap in the local symbols list.
* @param sid the symbol ID to assign to the new symbol.
*/
void addSymbol(String symbolName, int sid) {
assert sid >= firstLocalSid;
ValueFactory sys = image.getSystem();
IonValue syms = image.get(SYMBOLS);
// the symbols field if necessary.
while (syms != null && syms.getType() != IonType.LIST) {
image.remove(syms);
syms = image.get(SYMBOLS);
}
if (syms == null) {
syms = sys.newEmptyList();
image.put(SYMBOLS, syms);
}
int thisOffset = sid - firstLocalSid;
IonValue name = sys.newString(symbolName);
((IonList) syms).add(thisOffset, name);
}
use of com.amazon.ion.IonValue in project ion-java by amzn.
the class _Private_CurriedValueFactory method newNull.
public IonValue newNull(IonType type) {
IonValue v = myFactory.newNull(type);
handle(v);
return v;
}
Aggregations