public void writeTo(OutputStream out, Storage storage, Writer humanOut, boolean verbose)
      throws IOException {
    boolean annotate = (humanOut != null);
    ByteArrayAnnotatedOutput result = toDex0(annotate, verbose, storage);

    if (out != null) {
      out.write(result.getArray());
    }

    if (annotate) {
      result.writeAnnotationsTo(humanOut);
    }
  }
Writes the contents of this instance as either a binary or a human-readable form, or both.

@param out {@code null-ok;} where to write to
@param storage temporary storage for storing dexing.
@param humanOut {@code null-ok;} where to write human-oriented output to
@param verbose whether to be verbose when writing human-oriented output
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/DexFile.java