/** Write a little-endian 64-bit integer. */ public void writeFixed64(long value) throws IOException { sink.writeLongLe(value); } }
@Test public void writeLongLe() throws Exception { sink.writeLongLe(0xabcdef0187654321L); sink.writeLongLe(0xcafebabeb0b15c00L); sink.flush(); assertEquals("[hex=2143658701efcdab005cb1b0bebafeca]", data.toString()); }
@Test public void readLongLeTooShortThrows() throws IOException { sink.writeLongLe(Long.MAX_VALUE); sink.emit(); source.readByte(); try { source.readLongLe(); fail(); } catch (EOFException expected) { } }
/** Write a little-endian 64-bit integer. */ public void writeFixed64(long value) throws IOException { sink.writeLongLe(value); } }