public class DurboInput extends java.lang.Object implements DurboConstants, DurboNamespaceResolver
DurboInput
class implements a reader on a inputstream that
contains durbo-serialized data. DurboOutput
for a more detailed
description of this protocol.Modifier and Type | Class and Description |
---|---|
class |
DurboInput.Element
Inner class that represents one element of the Durbo protocol
|
class |
DurboInput.Node |
class |
DurboInput.Property |
Modifier and Type | Field and Description |
---|---|
static int |
PROPERTY_TYPE_BINARY
Deprecated.
Use
PropertyType#BINARY instead |
static int |
PROPERTY_TYPE_BOOLEAN
Deprecated.
Use
PropertyType#BOOLEAN instead |
static int |
PROPERTY_TYPE_DATE
Deprecated.
Use
PropertyType#DATE instead |
static int |
PROPERTY_TYPE_DOUBLE
Deprecated.
Use
PropertyType#DOUBLE instead |
static int |
PROPERTY_TYPE_LONG
Deprecated.
Use
PropertyType#LONG instead |
static int |
PROPERTY_TYPE_NAME
Deprecated.
Use
PropertyType#NAME instead |
static int |
PROPERTY_TYPE_PATH
Deprecated.
Use
PropertyType#PATH instead |
static int |
PROPERTY_TYPE_REFERENCE
Deprecated.
Use
PropertyType#REFERENCE instead |
static int |
PROPERTY_TYPE_STRING
Deprecated.
Use
PropertyType#STRING instead |
static int |
PROPERTY_TYPE_UNDEFINED
Deprecated.
Use
PropertyType#UNDEFINED instead |
DEFAULT_CONTENT_TYPE, MULTIPLE, NAMESPACE, NODE_END, NODE_START, PROPERTY, PROPERTY_TYPE_MASK, PROTOCOL_CONTENT_TYPE, PROTOCOL_ENCODING, PROTOCOL_HEADER, PROTOCOL_VERSION, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, PROTOCOL_VERSION_2_1
Constructor and Description |
---|
DurboInput(java.io.File file)
Creates a new
DurboInput on the specified file. |
DurboInput(java.io.InputStream inputStream)
Creates a new
DurboInput on the specified input stream. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType() |
java.lang.String |
getEncoding() |
java.lang.String |
getPrefix(java.lang.String uri)
returns the namespace prefix for the given uri
|
java.lang.String[] |
getPrefixes() |
java.lang.String |
getURI(java.lang.String prefix)
Returns the namespace uri for the given namespace
|
java.lang.String[] |
getURIs() |
double |
getVersion()
Returns the version
|
DurboInput.Element |
read()
Reads an element from this input
|
void |
skipNode()
skips a node
|
public static final int PROPERTY_TYPE_UNDEFINED
PropertyType#UNDEFINED
insteadpublic static final int PROPERTY_TYPE_STRING
PropertyType#STRING
insteadpublic static final int PROPERTY_TYPE_BINARY
PropertyType#BINARY
insteadpublic static final int PROPERTY_TYPE_LONG
PropertyType#LONG
insteadpublic static final int PROPERTY_TYPE_DOUBLE
PropertyType#DOUBLE
insteadpublic static final int PROPERTY_TYPE_DATE
PropertyType#DATE
insteadpublic static final int PROPERTY_TYPE_BOOLEAN
PropertyType#BOOLEAN
insteadpublic static final int PROPERTY_TYPE_NAME
PropertyType#NAME
insteadpublic static final int PROPERTY_TYPE_PATH
PropertyType#PATH
insteadpublic static final int PROPERTY_TYPE_REFERENCE
PropertyType#REFERENCE
insteadpublic DurboInput(java.io.File file) throws java.io.IOException
DurboInput
on the specified file. This
also reads the header to check if the underlying stream is of the correct
format. In difference to the more generic DurboInput(InputStream)
constructor this operates on a file an can therefor be optimized.file
- underlying filejava.io.IOException
- if an I/O error occurspublic DurboInput(java.io.InputStream inputStream) throws java.io.IOException
DurboInput
on the specified input stream. This
also reads the header to check if the underlying stream is of the correct
format.inputStream
- the input streamjava.io.IOException
- if an I/O error occurrspublic java.lang.String getEncoding()
public java.lang.String getContentType()
public double getVersion()
public DurboInput.Element read() throws java.io.IOException
null
if a end of the inputjava.io.IOException
- if an I/O error occurs or if the data do not
match the protocol specificationpublic void skipNode() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic java.lang.String getURI(java.lang.String prefix)
getURI
in interface DurboNamespaceResolver
prefix
- the namespace prefixpublic java.lang.String getPrefix(java.lang.String uri) throws NamespaceException
getPrefix
in interface DurboNamespaceResolver
uri
- the namespace uriNamespaceException
public java.lang.String[] getPrefixes()
public java.lang.String[] getURIs()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"