code: public BinaryEncoder writeBytes(byte[] bytes) throws IOException {
      writeLong(bytes.length);
      output.write(bytes, 0, bytes.length);
      return this;
    }
docs: write a sequence of bytes. First writes the number of bytes as an int, then the bytes themselves.
  @throws java.io.IOException If there is IO error.