public class News extends Object implements Comparable<News>
Constructor and Description |
---|
News(Date time,
String author,
String title,
String text,
String engTitle,
String engText)
Creates a new instance of News.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(News other) |
String |
getAuthor()
Gets the author.
|
String |
getText()
Gets the text.
|
Date |
getTime()
Gets the timestamp of the news.
|
String |
getTitle()
Gets the title.
|
static News |
readData(ObjectInputStream in,
int version)
Loads the news.
|
void |
writeData(ObjectOutputStream out)
Saves the news.
|
public Date getTime()
public String getAuthor()
public String getTitle()
public String getText()
public void writeData(ObjectOutputStream out) throws IOException
out
- The stream to save toIOException
- When saving failed.public static News readData(ObjectInputStream in, int version) throws IOException, ClassNotFoundException
in
- The stream to read from.version
- The file versionIOException
- If reading failedClassNotFoundException
- If the given stream is in a wrong format.public int compareTo(News other)
compareTo
in interface Comparable<News>
TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)