org.jaudiotagger.audio.asf.io
Class ContentDescriptionReader

java.lang.Object
  extended by org.jaudiotagger.audio.asf.io.ContentDescriptionReader

public class ContentDescriptionReader
extends java.lang.Object

Reads and interprets the data of a asf chunk containing title, author...

Author:
Christian Laireiter
See Also:
entagged.audioformats.asf.data.ContentDescription

Method Summary
static ContentDescription read(java.io.RandomAccessFile raf, Chunk candidate)
          Creates and fills a entagged.audioformats.asf.data.ContentDescriptionfrom given file.
static java.lang.String readFixedSizeUTF16Str(java.io.RandomAccessFile raf, int strLen)
          This method reads a UTF-16 encoded String.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static ContentDescription read(java.io.RandomAccessFile raf,
                                      Chunk candidate)
                               throws java.io.IOException
Creates and fills a entagged.audioformats.asf.data.ContentDescriptionfrom given file.

Parameters:
raf - Input
candidate - Chunk which possibly is a file header.
Returns:
FileHeader if filepointer of raf is at valid fileheader.
Throws:
java.io.IOException - Read errors.

readFixedSizeUTF16Str

public static java.lang.String readFixedSizeUTF16Str(java.io.RandomAccessFile raf,
                                                     int strLen)
                                              throws java.io.IOException
This method reads a UTF-16 encoded String.
For the use this method the number of bytes used by current string must be known.
The ASF spec recommends that those strings end with a terminating zero. However it also says that it is not always the case.

Parameters:
raf - Input source
strLen - Number of bytes the String may take.
Returns:
read String.
Throws:
java.io.IOException - read errors.