entagged.audioformats.mp3.util.id3frames
Class TimeId3Frame

java.lang.Object
  extended by entagged.audioformats.mp3.util.id3frames.Id3Frame
      extended by entagged.audioformats.mp3.util.id3frames.TextId3Frame
          extended by entagged.audioformats.mp3.util.id3frames.TimeId3Frame
All Implemented Interfaces:
TagField, TagTextField

public class TimeId3Frame
extends TextId3Frame

This specialization of a text field represents ID3v2 timestamp fields since 2.4.
Warning: For now only the year will be processed. Other information will be discarded.

The Time field allows various patterns:

Author:
Christian Laireiter

Field Summary
 
Fields inherited from class entagged.audioformats.mp3.util.id3frames.TextId3Frame
common, content, encoding, id
 
Fields inherited from class entagged.audioformats.mp3.util.id3frames.Id3Frame
flags, version
 
Constructor Summary
TimeId3Frame(String fieldId, byte[] rawContent, byte version)
          Creates a timestamp field.
TimeId3Frame(String fieldId, Calendar calendar)
          Creates a timestamp field.
TimeId3Frame(String fieldId, String content)
          Creates a timestamp field.
 
Method Summary
protected  void populate(byte[] raw)
          (overridden)
 
Methods inherited from class entagged.audioformats.mp3.util.id3frames.TextId3Frame
build, copyContent, getContent, getEncoding, getId, isBinary, isCommon, isEmpty, setContent, setEncoding, toString
 
Methods inherited from class entagged.audioformats.mp3.util.id3frames.Id3Frame
clone, copy, equals, getBytes, getFlags, getIdBytes, getRawContent, getSize, getString, indexOfFirstNull, isBinary
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface entagged.audioformats.generic.TagField
getRawContent, isBinary
 

Constructor Detail

TimeId3Frame

public TimeId3Frame(String fieldId,
                    byte[] rawContent,
                    byte version)
             throws UnsupportedEncodingException
Creates a timestamp field.

Parameters:
fieldId - frame identifier.
rawContent - the raw data of the frame.
version - the version identifier of the tag.
Throws:
UnsupportedEncodingException - When encoding is not supported.

TimeId3Frame

public TimeId3Frame(String fieldId,
                    Calendar calendar)
Creates a timestamp field.

Parameters:
fieldId - frame identifier.
calendar - Calendar containing the represented time.

TimeId3Frame

public TimeId3Frame(String fieldId,
                    String content)
Creates a timestamp field.

Parameters:
fieldId - frame identifier.
content - The content of the field in string representation.
Method Detail

populate

protected void populate(byte[] raw)
                 throws UnsupportedEncodingException
(overridden)

Overrides:
populate in class TextId3Frame
Parameters:
raw - The frame data.
Throws:
UnsupportedEncodingException - On text frames there can be such errors.
See Also:
TextId3Frame.populate(byte[])


Copyright © 2007-2008. All Rights Reserved.