TV-Browser 2.7.5 API

tvbrowserdataservice.file
Class SummaryFile

java.lang.Object
  extended by tvbrowserdataservice.file.AbstractFile
      extended by tvbrowserdataservice.file.SummaryFile

public class SummaryFile
extends AbstractFile

The summary file gives an overview over the files located on a mirror and their versions.

Author:
Til Schneider, www.murfman.de

Field Summary
static String SUMMARY_FILE_NAME
          The default file name for a summary file.
 
Constructor Summary
SummaryFile()
          Creates a new instance.
 
Method Summary
 int getDayProgramVersion(Date date, String country, String channelId, int level)
          Gets the version of a day program.
 void readFromStream(InputStream stream, DownloadJob job)
          Reads the summary from a stream.
 void setDayProgramVersion(Date date, String country, String channelId, int level, int version)
          Sets the version of a day program.
 void writeToStream(OutputStream stream, File fileName)
          Writes the summary into a stream.
 
Methods inherited from class tvbrowserdataservice.file.AbstractFile
readFromFile, writeToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUMMARY_FILE_NAME

public static final String SUMMARY_FILE_NAME
The default file name for a summary file.

See Also:
Constant Field Values
Constructor Detail

SummaryFile

public SummaryFile()
Creates a new instance.

Method Detail

setDayProgramVersion

public void setDayProgramVersion(Date date,
                                 String country,
                                 String channelId,
                                 int level,
                                 int version)
Sets the version of a day program.

Parameters:
date - The date of the day program.
country - The country of the day program's channel.
channelId - The ID of the day program's channel.
level - The level to set the version for.
version - The version to set.

getDayProgramVersion

public int getDayProgramVersion(Date date,
                                String country,
                                String channelId,
                                int level)
Gets the version of a day program.

Parameters:
date - The date of the day program.
country - The country of the day program's channel.
channelId - The ID of the day program's channel.
level - The level to get the version for.
Returns:
The version of the day program or -1 if there is no version for that day program and level.

readFromStream

public void readFromStream(InputStream stream,
                           DownloadJob job)
                    throws IOException,
                           FileFormatException
Reads the summary from a stream.

Specified by:
readFromStream in class AbstractFile
Parameters:
stream - The stream to read the summary from.
Throws:
IOException
FileFormatException

writeToStream

public void writeToStream(OutputStream stream,
                          File fileName)
                   throws IOException,
                          FileFormatException
Writes the summary into a stream.

Specified by:
writeToStream in class AbstractFile
Parameters:
stream - The stream to write the summary to.
Throws:
IOException
FileFormatException

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)