public class SummaryFile extends AbstractFile
Modifier and Type | Field and Description |
---|---|
static String |
SUMMARY_FILE_NAME
The default file name for a summary file.
|
Constructor and Description |
---|
SummaryFile()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
readFromFile, writeToFile
public static final String SUMMARY_FILE_NAME
public void setDayProgramVersion(Date date, String country, String channelId, int level, int version)
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.public int getDayProgramVersion(Date date, String country, String channelId, int level)
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.-1
if there is no
version for that day program and level.public void readFromStream(InputStream stream, DownloadJob job) throws IOException, FileFormatException
readFromStream
in class AbstractFile
stream
- The stream to read the summary from.IOException
FileFormatException
public void writeToStream(OutputStream stream, File fileName) throws IOException, FileFormatException
writeToStream
in class AbstractFile
stream
- The stream to write the summary to.IOException
FileFormatException
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)