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  
     /**
 18  
      * Determines, whether the modifier handles chunks identified by given <code>guid</code>.
 19  
      * 
 20  
      * @param guid GUID to test.
 21  
      * @return <code>true</code>, if this modifier can be used to modify the chunk.
 22  
      */
 23  
     public boolean isApplicable(GUID guid);
 24  
 
 25  
     /**
 26  
      * Writes a modified copy of the chunk into the <code>destination.</code>.<br>
 27  
      * 
 28  
      * @param guid GUID of the chunk to modify.
 29  
      * @param source a stream providing the chunk, starting at the chunks length field.
 30  
      * @param destination destination for the modified chunk.
 31  
      * @return the differences between source and destination.
 32  
      * @throws IOException on I/O errors.
 33  
      */
 34  
     public ModificationResult modify(GUID guid, InputStream source, OutputStream destination) throws IOException;
 35  
 
 36  
 }