entagged.audioformats.asf.io
Class ContentDescriptionReader

java.lang.Object
  extended by entagged.audioformats.asf.io.ContentDescriptionReader

public class ContentDescriptionReader
extends Object

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

Author:
Christian Laireiter
See Also:
ContentDescription

Constructor Summary
protected ContentDescriptionReader()
          Should not be used for now.
 
Method Summary
static ContentDescription read(RandomAccessFile raf, Chunk candidate)
          Creates and fills a ContentDescriptionfrom given file.
static String readFixedSizeUTF16Str(RandomAccessFile raf, int strLen)
          This method reads a UTF-16 encoded String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentDescriptionReader

protected ContentDescriptionReader()
Should not be used for now.

Method Detail

read

public static ContentDescription read(RandomAccessFile raf,
                                      Chunk candidate)
                               throws IOException
Creates and fills a 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:
IOException - Read errors.

readFixedSizeUTF16Str

public static String readFixedSizeUTF16Str(RandomAccessFile raf,
                                           int strLen)
                                    throws 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:
IOException - read errors.


Copyright © 2007-2008. All Rights Reserved.