javax.emb
Interface MediaHeader

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
GenericMediaHeader (src) , IIOMediaHeader (src) , MpegAudioHeader (src) , OggVorbisHeader (src)

public interface MediaHeader
extends java.io.Serializable

The interface MediaHeader defines the common behavior between media header implementations. All media header instances must allow access to the format specific header fields by name, in order to allow easy generic access in case some information is required for browsing purposes. Additionally, all header fields accessible by the MediaHeader.getField(String) method must be accessible by standard getter methods, too. As media header instances have to be transferred over machine boundaries at times, this interface extends Serializable.


Method Summary
 java.lang.Object getField(java.lang.String fieldName)
          Returns the field with the given name downcast to Object.
 java.lang.String[] getFieldNames()
          Returns an array of Strings containing all the field names defined for the header.
 

Method Detail

getFieldNames

public java.lang.String[] getFieldNames()
Returns an array of Strings containing all the field names defined for the header.

Returns:
an array of header field names.

getField

public java.lang.Object getField(java.lang.String fieldName)
Returns the field with the given name downcast to Object. If the field is modeled as a Java base type, an instance of the corresponding wrapper class has to be returned. The value null is returned if a field name is passed that is not defined for the receiver.

Parameters:
fieldName - header field name.
Returns:
the content of a header field.
Throws:
java.lang.NullPointerException - if the value passed is null.