The java logic behind my online app to convert between subtitle formats