Package totalcross.xml
Class XmlReadableSocket
- java.lang.Object
-
- totalcross.io.Stream
-
- totalcross.net.HttpStream
-
- totalcross.xml.XmlReadableSocket
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,XmlReadable
public class XmlReadableSocket extends HttpStream implements XmlReadable
An XmlReadableSocket has a Socket stream that takes care of the HTTP headers and starts reading at the message body.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.net.HttpStream
HttpStream.Options
-
-
Field Summary
-
Fields inherited from class totalcross.net.HttpStream
badResponseCode, buffer, connection, contentEncoding, contentLength, contentRead, contentType, cookies, debugHeader, DELETE, GET, headers, IMAGE_TYPE, location, lr, MULTIPART_TYPE, ofsEnd, ofsStart, PATCH, POST, PUT, readPos, readTokensDelimiter, readTokensDoTrim, responseCode, sendSleep, socket, TEXT_HTML_TYPE, tr, UNKNOWN_TYPE, version
-
Fields inherited from class totalcross.io.Stream
skipBuffer
-
-
Constructor Summary
Constructors Constructor Description XmlReadableSocket(URI uri)ConstructorXmlReadableSocket(URI uri, HttpStream.Options options)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URIgetBaseURI()Get the base URI attached to this XmlReadablevoidreadXml(XmlReader rdr)Read this XmlReadable through an XmlReader parser.voidsetCaseInsensitive(boolean caseInsensitive)-
Methods inherited from class totalcross.net.HttpStream
close, getStatus, init, isOk, makeImage, readBytes, readLine, readTokens, refill, shouldSendData, skipToNextMimePart, writeBytes, writeResponseRequest
-
Methods inherited from class totalcross.io.Stream
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytes
-
-
-
-
Constructor Detail
-
XmlReadableSocket
public XmlReadableSocket(URI uri, HttpStream.Options options) throws IllegalArgumentIOException, IOException
Constructor- Parameters:
uri- to connect tooptions- The options for this socket- Throws:
IOExceptionIllegalArgumentIOException
-
XmlReadableSocket
public XmlReadableSocket(URI uri) throws IllegalArgumentIOException, IOException
Constructor- Parameters:
uri- to connect to- Throws:
IOExceptionIllegalArgumentIOException
-
-
Method Detail
-
readXml
public void readXml(XmlReader rdr) throws SyntaxException, IOException
Description copied from interface:XmlReadableRead this XmlReadable through an XmlReader parser.- Specified by:
readXmlin interfaceXmlReadable- Parameters:
rdr- the XmlReader that will report the SAX events- Throws:
SyntaxExceptionIOException
-
getBaseURI
public URI getBaseURI()
Description copied from interface:XmlReadableGet the base URI attached to this XmlReadable- Specified by:
getBaseURIin interfaceXmlReadable- Returns:
- the base URI attached to this XmlReadable
-
setCaseInsensitive
public void setCaseInsensitive(boolean caseInsensitive)
- Specified by:
setCaseInsensitivein interfaceXmlReadable
-
-