public class WFSMarshal extends AbstractMarshal
Modifier and Type | Field and Description |
---|---|
static Marshal |
INSTANCE |
contentType
Modifier and Type | Method and Description |
---|---|
int |
getPriorityLevel()
Returns the priority level of the marshal.
|
java.lang.String |
marshal(java.io.InputStream inputStream,
int probeSize)
Analyzes the specified stream to determine if it contains the content associated with this
Marshal . |
java.lang.String |
marshal(android.net.Uri uri)
Analyzes the data at the specified
Uri to determine if it contains the content
associated with this Marshal . |
getContentType, marshalUriAsStream
public static final Marshal INSTANCE
public java.lang.String marshal(java.io.InputStream inputStream, int probeSize) throws java.io.IOException
Marshal
Marshal
. If the stream does contain compatible content, the MIME type of the
stream is returned, otherwise null
is returned.
Only the number of bytes specified by probeSize
may be read from the stream
during analysis.
inputStream
- A data streamprobeSize
- The number of bytes that may be read from the streamnull
otherwise.java.io.IOException
- If an IO error occurs while reading data from the streampublic java.lang.String marshal(android.net.Uri uri) throws java.io.IOException
Marshal
Uri
to determine if it contains the content
associated with this Marshal
. If the Uri
does contain compatible
content, the MIME type of the Uri
is returned, otherwise null
is
returned.uri
- A URInull
otherwise.java.io.IOException
- If an IO error occurs while reading data from the URIpublic int getPriorityLevel()
Marshal
MarshalManager
prior to marshals with lower priority levels.
The recommendation is that the priority level should increase when the content is
identifiable through an increase in specificity for the data stream. For example, a
Marshal
that detects a stream as XML should return a priority level of
0
. A Marshal
that detects CoT should return a level of
1
and a Marshal
that detects KML should return a level of
1
as both are direct derivatives of XML. A Marshal
that detects a
specific type of CoT should return a level of 2
to ensure it gets invoked prior
to a generic CoT Marshal
.