use of com.google.common.io.ByteArrayDataOutput in project presto by prestodb.
the class RaptorColumnIdentity method serialize.
@Override
public byte[] serialize() {
ByteArrayDataOutput output = newDataOutput(SERIALIZED_SIZE);
output.write(CURRENT_VERSION);
output.writeLong(columnId);
return output.toByteArray();
}
use of com.google.common.io.ByteArrayDataOutput in project EventHub by Codecademy.
the class JournalUtil method locationToBytes.
public static byte[] locationToBytes(Location location) throws IOException {
ByteArrayDataOutput dos = ByteStreams.newDataOutput();
location.writeExternal(dos);
return dos.toByteArray();
}
use of com.google.common.io.ByteArrayDataOutput in project drill by apache.
the class HiveScan method serializeInputSplit.
public static String serializeInputSplit(final InputSplit split) throws IOException {
final ByteArrayDataOutput byteArrayOutputStream = ByteStreams.newDataOutput();
split.write(byteArrayOutputStream);
final String encoded = Base64.encodeBase64String(byteArrayOutputStream.toByteArray());
logger.debug("Encoded split string for split {} : {}", split, encoded);
return encoded;
}
use of com.google.common.io.ByteArrayDataOutput in project oxAuth by GluuFederation.
the class RawAuthenticationService method packBytesToSign.
private byte[] packBytesToSign(byte[] appIdHash, byte userPresence, long counter, byte[] challengeHash) {
ByteArrayDataOutput encoded = ByteStreams.newDataOutput();
encoded.write(appIdHash);
encoded.write(userPresence);
encoded.writeInt((int) counter);
encoded.write(challengeHash);
return encoded.toByteArray();
}
use of com.google.common.io.ByteArrayDataOutput in project oxAuth by GluuFederation.
the class RawRegistrationService method packBytesToSign.
private byte[] packBytesToSign(byte[] appIdHash, byte[] clientDataHash, byte[] keyHandle, byte[] userPublicKey) {
ByteArrayDataOutput encoded = ByteStreams.newDataOutput();
encoded.write(REGISTRATION_SIGNED_RESERVED_BYTE_VALUE);
encoded.write(appIdHash);
encoded.write(clientDataHash);
encoded.write(keyHandle);
encoded.write(userPublicKey);
return encoded.toByteArray();
}
Aggregations