|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.dstore.core.util.XMLparser
This class is used to deserialize data received from a file or a socket.
When tags indicate that data is being received, the byte stream is deserialized as a DataStore tree. When deserialized data maps to existing DataElements in the DataStore, those elements are updated directly. Any deserialized data that maps to within an existing DataElement, that does not already exist, gets created under the existing DataElement. When parsing DataElement XML, there is no intermediate DOM - rather the DOM is the DataStore itself.
When tags indicate that a byte stream or file is being received, bytes are
sent the the current DataStore ByteStreamHandler
to be saved on disk.
Nested Class Summary | |
---|---|
class |
XMLparser.KeepAliveRequestThread
|
Field Summary | |
---|---|
static String |
Copyright
|
static int |
IO_SOCKET_READ_TIMEOUT
|
static long |
KEEPALIVE_RESPONSE_TIMEOUT
|
Constructor Summary | |
---|---|
XMLparser(DataStore dataStore)
Constructor |
Method Summary | |
---|---|
static String |
convertStringFromXML(String input)
Converts XML special character representations to the appropriate characters |
Throwable |
getPanicException()
Returns the communications exception if one occurred |
DataElement |
parseDocument(BufferedInputStream reader,
Socket socket)
This method gets called to receive data from the pipe. |
protected DataElement |
parseTag(String fullTag,
DataElement parent)
Deserializes a single DataElement from the XML stream. |
void |
readFile(BufferedInputStream reader,
int size,
String path,
String byteStreamHandlerId)
Read a file from the pipe |
String |
readLine(BufferedInputStream reader,
Socket socket)
Reads a line from the pipe |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String Copyright
public static final int IO_SOCKET_READ_TIMEOUT
public static final long KEEPALIVE_RESPONSE_TIMEOUT
Constructor Detail |
public XMLparser(DataStore dataStore)
dataStore
- the associated DataStoreMethod Detail |
public void readFile(BufferedInputStream reader, int size, String path, String byteStreamHandlerId)
reader
- the pipe readersize
- the number of bytes to readpath
- the path of the file where the received bytes should be insertedpublic String readLine(BufferedInputStream reader, Socket socket)
reader
- the pipe reader
public Throwable getPanicException()
public DataElement parseDocument(BufferedInputStream reader, Socket socket) throws IOException
ByteStreamHandler
.
reader
- the pipe reader
IOException
protected DataElement parseTag(String fullTag, DataElement parent)
fullTag
- the DataElement XML tagparent
- the DataElement that container for the deserialized DataElement
public static String convertStringFromXML(String input)
input
- buffer to convert
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |