public final void writeVarBytes(final byte[] sa) {
        if (sa == null) {
            writeVarLengthUnsigned(0);
        } else {
            final int len = sa.length;
            writeVarLengthUnsigned(len);
            write(sa, 0, len);
        }
    }
fast data-writing to a byte-array

@author ab
main/src/main/java/cgeo/geocaching/brouter/util/ByteDataWriter.java