Package p2pradio

Examples of p2pradio.Metadata


    }
  }
 
  public boolean touchYP(int action)
  {
    Metadata metadata = buffer.getMetadata();
    InputStream inputStream = null;
       
    boolean error = true;
    boolean gotID = false;
    boolean secondTry = false;
    String errorDescription = "Invalid answer"; //$NON-NLS-1$

    waitTime = DEFAULT_WAIT_TIME;
   
    if ((ID == null) && ((action == ACTION_UPDATE) || (action == ACTION_REMOVE)))
    {
      return false;
    }
   
    try
    {
      String url = "http://" + YP_HOST + YP_DIR;  //$NON-NLS-1$
     
      if (action == ACTION_ADD)
      {
        url += "add.php?" + getMetadataString(metadata); //$NON-NLS-1$
      }
      else if (action == ACTION_UPDATE)
      {
        // Save bandwidth if possible
       
        boolean update_everything = true;
       
        update_everything = !(metadata.getContentType().equals(lastContentType)
         && metadata.getStationName().equals(lastStationName)
         && metadata.getStationURL().equals(lastStationURL)
         && metadata.getGenre().equals(lastGenre)
         && metadata.getDescription().equals(lastDescription));
       
        if (update_everything)
        {
          url += "update.php?" + getUpdateMetadataString(metadata); //$NON-NLS-1$
        }
View Full Code Here


    checkBytesLeft(length);
   
    // Metadaten von einem ByteArrayInputStream lesen
    ByteArrayInputStream metadataStream = new ByteArrayInputStream(content, offset, length);
   
    metadata = new Metadata(metadataStream);
    
    offset += length;
  }
View Full Code Here

TOP

Related Classes of p2pradio.Metadata

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.