int PASSWORD = 3;
m_password = nodes[ startIndex + PASSWORD ];
if (iTunesCapable) {
// Dencode so that password is not in regular lettters.
Base64 b64 = new Base64();
byte[] decodedPassword = b64.decode(m_password);
try {
m_password = new String( decodedPassword , "UTF-8" );
} catch (UnsupportedEncodingException e) {
m_password = new String( decodedPassword );
}
if (hasPipe) {
m_password = m_password.replace(CONE, '|');
}
}
m_items = new Vector();
if (firstSettings) {
// Given the bugs with the first settings, we do not
// retrieve the items so that we can restore them
// without the bugs.
return;
}
int ITEMS = (iTunesCapable ? ITUNES_ITEMS : 5);
int UPDDATE = 4;
String dateString = nodes[startIndex + UPDDATE];
if(dateString.length()>0) {
if (iTunesCapable) {
m_upddate = new Date(Long.parseLong(dateString, 16));
} else {
m_upddate = new Date(Long.parseLong(dateString));
}
}
if (iTunesCapable && hasPipe) {
m_name = m_name.replace(CONE, '|');
} else {
if (!iTunesCapable) {
// Dencode for better UTF-8 and to allow '|' in the name.
// For iTunesCapable, replace | with (char)1
Base64 b64 = new Base64();
byte[] decodedName = b64.decode(m_name);
try {
m_name = new String( decodedName , "UTF-8" );
} catch (UnsupportedEncodingException e) {
m_name = new String( decodedName );
}