Skip to content

okio / okio / BufferedSink / writeHexadecimalUnsignedLong

writeHexadecimalUnsignedLong

(js, jvm, native) abstract fun writeHexadecimalUnsignedLong(v:Long):BufferedSink

Writes a long to this sink in hexadecimal form (i.e., as a string in base 16).

Buffer buffer = new Buffer();
buffer.writeHexadecimalUnsignedLong(65535L);
buffer.writeByte(' ');
buffer.writeHexadecimalUnsignedLong(0xcafebabeL);
buffer.writeByte(' ');
buffer.writeHexadecimalUnsignedLong(0x10L);

assertEquals("ffff cafebabe 10", buffer.readUtf8());