public boolean rewriteExif(ByteBuffer buf,Collection<ExifTag> tags) throws IOException {
  ExifModifier mod=null;
  try {
    mod=new ExifModifier(buf,this);
    for (    ExifTag t : tags) {
      mod.modifyTag(t);
    }
    return mod.commit();
  }
 catch (  ExifInvalidFormatException e) {
    throw new IOException("Invalid exif format : " + e);
  }
}

public boolean rewriteExif ( ByteBuffer buf , Collection < ExifTag > tags ) throws IOException { ExifModifier mod = null ; try { mod = new ExifModifier ( buf , this ) ; for ( ExifTag t : tags ) { mod . modifyTag ( t ) ; } return mod . commit ( ) ; } catch ( ExifInvalidFormatException e ) { throw new IOException ( "Invalid exif format : " + e ) ; } }
attempts to do an in - place rewrite the exif metadata in a bytebuffer for the given tags . if tags do not exist or do not have the same size as the existing exif tags , this method will fail .
