use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class BinaryWriterTest method flushUnlockedSymtab.
private byte[] flushUnlockedSymtab(boolean lstAppendEnabled) throws Exception {
myLstAppendEnabled = lstAppendEnabled;
iw = makeWriter();
iw.writeSymbol("force a local symtab");
SymbolTable symtab = iw.getSymbolTable();
symtab.intern("fred_1");
symtab.intern("fred_2");
iw.writeSymbol("fred_1");
iw.flush();
return myOutputStream.toByteArray();
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class BinaryWriterTest method flushUnlockedSymtabWithImports.
private byte[] flushUnlockedSymtabWithImports(SimpleCatalog catalog, boolean lstAppendEnabled) throws Exception {
SymbolTable fred1 = Symtabs.register("fred", 1, catalog);
myLstAppendEnabled = lstAppendEnabled;
iw = makeWriter(fred1);
iw.writeSymbol("fred_1");
// This would cause an appended LST to be written before the next value.
iw.flush();
return myOutputStream.toByteArray();
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class BinaryWriterWithLocalSymtabsTest method testConstructionWithSharedSymtab.
@Test(expected = IllegalArgumentException.class)
public void testConstructionWithSharedSymtab() throws Exception {
SymbolTable fred1 = Symtabs.register("fred", 1, catalog());
makeBinaryWriterWithLocalSymbols(fred1);
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class BinaryWriterWithLocalSymtabsTest method testConstructionWithNoLocalSymbolsAndOneImports.
@Test
public void testConstructionWithNoLocalSymbolsAndOneImports() throws Exception {
String[] localSymbols = EMPTY_STRING_ARRAY;
SymbolTable fred1 = Symtabs.register("fred", 1, catalog());
checkConstructionWithLocalSymbolsAndImports(localSymbols, fred1);
}
use of com.amazon.ion.SymbolTable in project ion-java by amzn.
the class BinaryWriterWithLocalSymtabsTest method testConstructionWithSystemSymtab.
// ==========================================================================
@Test
public void testConstructionWithSystemSymtab() throws Exception {
SymbolTable systemSymtab = system().getSystemSymbolTable();
// This is okay!
makeBinaryWriterWithLocalSymbols(systemSymtab);
}
Aggregations