~ubuntu-branches/ubuntu/utopic/libjaudiotagger-java/utopic

« back to all changes in this revision

Viewing changes to src/org/jaudiotagger/audio/asf/io/ChunkReader.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath, Damien Raude-Morvan, Varun Hiremath
  • Date: 2009-04-01 19:17:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090401191756-bygniim270guy7o1
Tags: 1.0.9-1
[ Damien Raude-Morvan ]
* New upstream release
* debian/watch: Use java.net repository (which contains new releases!)
* debian/control:
  - Build-Depends on default-jdk-builddep
  - Bump Standards-Version to 3.8.1 (no changes needed)
  - Change section to "java"
* debian/rules: use default-java as JAVA_HOME
* debina/orig-tar.{sh|excludes}: strip audio and others binary files from ZIP
* debian/build.xml:
  - compile with "nowarn" to keep build log readable
  - exclude LogFormatter from build (use com.sun classes)
* debian/ant.properties: new source directory is "src" in orig.tar.gz
* Add myself as Uploaders

[ Varun Hiremath ]
* Accept changes made by Damien Raude-Morvan (Closes: #522130)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jaudiotagger.audio.asf.io;
 
2
 
 
3
import java.io.IOException;
 
4
import java.io.InputStream;
 
5
 
 
6
import org.jaudiotagger.audio.asf.data.Chunk;
 
7
import org.jaudiotagger.audio.asf.data.GUID;
 
8
 
 
9
/**
 
10
 * A ChunkReader provides methods for reading an ASF chunk.<br>
 
11
 * 
 
12
 * @author Christian Laireiter
 
13
 */
 
14
public interface ChunkReader
 
15
{
 
16
 
 
17
    /**
 
18
     * Tells whether the reader can fail to return a valid chunk.<br>
 
19
     * The current Use would be a modified version of {@link StreamChunkReader}, which
 
20
     * is configured to only manage audio streams. However, the primary GUID for
 
21
     * audio and video streams is the same. So if a stream shows itself to
 
22
     * be a video stream, the reader would return <code>null</code>.<br> 
 
23
     * 
 
24
     * @return <code>true</code>, if further analysis of the chunk can show,
 
25
     *  that the reader is not applicable, despite the header GUID 
 
26
     *  {@linkplain #getApplyingId() identification} told it can handle the chunk. 
 
27
     */
 
28
    public boolean canFail();
 
29
 
 
30
    /**
 
31
     * Returns the GUID identifying the type of chunk, this reader will parse.<br>
 
32
     * 
 
33
     * @return the GUID identifying the type of chunk, this reader will parse.<br>
 
34
     */
 
35
    public GUID getApplyingId();
 
36
 
 
37
    /**
 
38
     * Parses the chunk.
 
39
     * 
 
40
     * @param guid the GUID of the chunks header, which is about to be read.  
 
41
     * @param stream source to read chunk from.<br> No  {@link GUID} is expected at the currents stream position. 
 
42
     *               The length of the chunk is about to follow. 
 
43
     * @param streamPosition the position in stream, the chunk starts.<br>
 
44
     * @return the read chunk. (Mostly a subclass of {@link Chunk}).<br>
 
45
     * @throws IOException On I/O Errors.
 
46
     */
 
47
    public Chunk read(GUID guid, InputStream stream, long streamPosition) throws IOException;
 
48
}