MCPcopy Create free account
hub / github.com/amazon-ion/ion-java / ensureBinary

Method ensureBinary

src/test/java/com/amazon/ion/TestUtils.java:235–241  ·  view source on GitHub ↗
(IonSystem system, byte[] ionData)

Source from the content-addressed store, hash-verified

233
234
235 public static byte[] ensureBinary(IonSystem system, byte[] ionData)
236 {
237 if (IonStreamUtils.isIonBinary(ionData)) return ionData;
238
239 IonDatagram dg = system.getLoader().load(ionData);
240 return dg.getBytes();
241 }
242
243 public static byte[] ensureText(IonSystem system, byte[] ionData)
244 {

Callers 5

toBinaryMethod · 0.95
newDatagramMethod · 0.80
newReaderMethod · 0.80

Calls 4

isIonBinaryMethod · 0.95
getBytesMethod · 0.95
loadMethod · 0.65
getLoaderMethod · 0.65

Tested by

no test coverage detected