Coverage Report - org.jaudiotagger.audio.asf.io.ChunkModifier
 
Classes in this File Line Coverage Branch Coverage Complexity
ChunkModifier
N/A
N/A
1
 
 1  
 package org.jaudiotagger.audio.asf.io;
 2  
 
 3  
 import org.jaudiotagger.audio.asf.data.GUID;
 4  
 
 5  
 import java.io.IOException;
 6  
 import java.io.InputStream;
 7  
 import java.io.OutputStream;
 8  
 
 9  
 /**
 10  
  * Reads an ASF chunk and writes a modified copy.<br>
 11  
  * 
 12  
  * @author Christian Laireiter
 13  
  */
 14  
 public interface ChunkModifier {
 15  
 
 16  
     /**
 17  
      * Determines, whether the modifier handles chunks identified by given
 18  
      * <code>guid</code>.
 19  
      * 
 20  
      * @param guid
 21  
      *            GUID to test.
 22  
      * @return <code>true</code>, if this modifier can be used to modify the
 23  
      *         chunk.
 24  
      */
 25  
     boolean isApplicable(GUID guid);
 26  
 
 27  
     /**
 28  
      * Writes a modified copy of the chunk into the <code>destination.</code>.<br>
 29  
      * 
 30  
      * @param guid
 31  
      *            GUID of the chunk to modify.
 32  
      * @param source
 33  
      *            a stream providing the chunk, starting at the chunks length
 34  
      *            field.
 35  
      * @param destination
 36  
      *            destination for the modified chunk.
 37  
      * @return the differences between source and destination.
 38  
      * @throws IOException
 39  
      *             on I/O errors.
 40  
      */
 41  
     ModificationResult modify(GUID guid, InputStream source,
 42  
             OutputStream destination) throws IOException;
 43  
 
 44  
 }