blob: d15f906f12c3cbd1fb6661c9f0cb7cf5f2871584 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2009 The Android Open Source Project
package com.google.wireless.gdata2.parser.xml;
import com.google.wireless.gdata2.data.MediaEntry;
import com.google.wireless.gdata2.data.Entry;
import com.google.wireless.gdata2.data.Feed;
import com.google.wireless.gdata2.parser.ParseException;
import org.xmlpull.v1.XmlPullParser;
import java.io.InputStream;
/**
* GDataParser for a MediaEntry. This must only be used to parse an entry, not a feed, since
* there is no such thing as a feed of media entries.
*/
public class XmlMediaEntryGDataParser extends XmlGDataParser {
/**
* Creates a new XmlMediaEntryGDataParser.
* @param is The InputStream that should be parsed.
* @param parser the XmlPullParser to use for the xml parsing
* @throws com.google.wireless.gdata2.parser.ParseException Thrown if a parser cannot be created.
*/
public XmlMediaEntryGDataParser(InputStream is, XmlPullParser parser) throws ParseException {
super(is, parser);
}
/*
* (non-Javadoc)
* @see com.google.wireless.gdata2.parser.xml.XmlGDataParser#createFeed()
*/
protected Feed createFeed() {
throw new IllegalStateException("there is no such thing as a feed of media entries");
}
/*
* (non-Javadoc)
* @see com.google.wireless.gdata2.parser.xml.XmlGDataParser#createEntry()
*/
protected Entry createEntry() {
return new MediaEntry();
}
}
|