Example usage for com.google.common.io ByteArrayDataOutput write

List of usage examples for com.google.common.io ByteArrayDataOutput write

Introduction

In this page you can find the example usage for com.google.common.io ByteArrayDataOutput write.

Prototype

@Override
    void write(byte b[], int off, int len);

Source Link

Usage

From source file:org.apache.druid.indexer.InputRowSerde.java

private static void writeBytes(@Nullable byte[] value, ByteArrayDataOutput out) throws IOException {
    int length = value == null ? -1 : value.length;
    WritableUtils.writeVInt(out, length);
    if (value != null) {
        out.write(value, 0, value.length);
    }//w w w .  j  av  a2s  .c  o m
}