public void writeTo(OutputStream out) throws IOException {
    if (image.getImageFormat() == OciManifestTemplate.class) {
      ociWriteTo(out);
    } else {
      dockerWriteTo(out);
    }
  }
Writes image tar bar in configured {@link Image#getImageFormat()} of OCI or Docker to output
stream.

@param out the target output stream
@throws IOException if an error occurs writing out the image to stream
jib-core/src/main/java/com/google/cloud/tools/jib/image/ImageTarball.java