Methods Summary |
---|
public boolean | equals(java.lang.Object obj)
if (!(obj instanceof Lyrics3TimeStamp))
{
return false;
}
Lyrics3TimeStamp object = (Lyrics3TimeStamp) obj;
if (this.minute != object.minute)
{
return false;
}
return this.second == object.second && super.equals(obj);
|
public long | getMinute()
return minute;
|
public long | getSecond()
return second;
|
public int | getSize()
return 7;
|
public void | readByteArray(byte[] arr, int offset)
readString(arr.toString(), offset);
|
public void | readString(java.lang.String s)Todo this is wrong
|
public void | readString(java.lang.String timeStamp, int offset)
if (timeStamp == null)
{
throw new NullPointerException("Image is null");
}
if ((offset < 0) || (offset >= timeStamp.length()))
{
throw new IndexOutOfBoundsException("Offset to timeStamp is out of bounds: offset = " + offset + ", timeStamp.length()" + timeStamp.length());
}
timeStamp = timeStamp.substring(offset);
if (timeStamp.length() == 7)
{
minute = Integer.parseInt(timeStamp.substring(1, 3));
second = Integer.parseInt(timeStamp.substring(4, 6));
}
else
{
minute = 0;
second = 0;
}
|
public void | setMinute(long minute)
this.minute = minute;
|
public void | setSecond(long second)
this.second = second;
|
public void | setTimeStamp(long timeStamp, byte timeStampFormat)Creates a new ObjectLyrics3TimeStamp datatype.
/**
* @todo convert both types of formats
*/
timeStamp = timeStamp / 1000;
minute = timeStamp / 60;
second = timeStamp % 60;
|
public java.lang.String | toString()
return writeString();
|
public byte[] | writeByteArray()
return Utils.getDefaultBytes(writeString(), "ISO8859-1");
|
public java.lang.String | writeString()
String str;
str = "[";
if (minute < 0)
{
str += "00";
}
else
{
if (minute < 10)
{
str += '0";
}
str += Long.toString(minute);
}
str += ':";
if (second < 0)
{
str += "00";
}
else
{
if (second < 10)
{
str += '0";
}
str += Long.toString(second);
}
str += ']";
return str;
|