protected void fetchMetadata() throws IOException {
  remaining=period;
  int size=in.read();
  if (size < 1)   return;
  size<<=4;
  if (mbuffer.length < size) {
    mbuffer=null;
    mbuffer=new byte[size];
    Log.d(LOG,"Enlarged metadata buffer to " + size + " bytes");
  }
  size=readFully(mbuffer,0,size);
  for (int i=0; i < size; i++) {
    if (mbuffer[i] == 0) {
      size=i;
      break;
    }
  }
  String s;
  try {
    s=new String(mbuffer,0,size,characterEncoding);
  }
 catch (  Exception e) {
    Log.e(LOG,"Cannot convert bytes to String");
    return;
  }
  Log.d(LOG,"Metadata string: " + s);
  parseMetadata(s);
}

protected void fetchMetadata ( ) throws IOException { remaining = period ; int size = in . read ( ) ; if ( size < 1 ) return ; size <<= 4 ; if ( mbuffer . length < size ) { mbuffer = null ; mbuffer = new byte [ size ] ; Log . d ( LOG , "Enlarged metadata buffer to " + size + " bytes" ) ; } size = readFully ( mbuffer , 0 , size ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( mbuffer [ i ] == 0 ) { size = i ; break ; } } String s ; try { s = new String ( mbuffer , 0 , size , characterEncoding ) ; } catch ( Exception e ) { Log . e ( LOG , "Cannot convert bytes to String" ) ; return ; } Log . d ( LOG , "Metadata string: " + s ) ; parseMetadata ( s ) ; }
this method reads the metadata string . actually it calls the method parsemetadata ( ) .
