| Package | Description |
|---|---|
| com.cloudhopper.sxmp |
| Modifier and Type | Class and Description |
|---|---|
class |
DeliverRequest |
class |
DeliverResponse |
class |
DeliveryReportRequest |
class |
DeliveryReportResponse |
class |
ErrorResponse |
class |
MessageRequest<E extends Response> |
class |
PartialOperation
An operation that could only be partially parsed.
|
class |
Request<E extends Response> |
class |
Response |
class |
SubmitRequest |
class |
SubmitResponse |
| Modifier and Type | Method and Description |
|---|---|
Operation |
SxmpParsingException.getOperation()
Gets the partially parsed Operation if it exists.
|
Operation |
SxmpParser.parse(InputStream in)
public Node parse(InputSource source) throws IOException, SAXException {
// _dtd=null;
Handler handler = new Handler();
XMLReader reader = _parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
if (logger.isDebugEnabled())
logger.debug("parsing: sid=" + source.getSystemId() + ",pid=" + source.getPublicId());
_parser.parse(source, handler);
if (handler.error != null)
throw handler.error;
Node root = (Node)handler.root;
handler.reset();
return root;
}
public synchronized Node parse(String xml) throws IOException, SAXException {
ByteArrayInputStream is = new ByteArrayInputStream(xml.getBytes());
return parse(is);
}
public synchronized Node parse(File file) throws IOException, SAXException {
return parse(new InputSource(file.toURI().toURL().toString()));
}
public synchronized Node parse(InputStream in) throws IOException, SAXException {
//_dtd=null;
Handler handler = new Handler();
XMLReader reader = _parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
_parser.parse(new InputSource(in), handler);
if (handler.error != null)
throw handler.error;
Node root = (Node)handler.root;
handler.reset();
return root;
}
|
| Modifier and Type | Method and Description |
|---|---|
static String |
SxmpWriter.createString(Operation operation)
static public byte[] createByteArray(Operation operation) throws SxmpErrorException, IOException {
// most requests will be ~1000 bytes
//FastByteArrayOutputStream baos = new FastByteArrayOutputStream(1000);
ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
OutputStreamWriter out = new OutputStreamWriter(baos, "ISO-8859-1");
SxmpWriter.write(out, operation);
byte[] data = baos.toByteArray();
//out.close();
//baos.close();
return data;
}
|
static void |
SxmpWriter.write(Writer out,
Operation operation) |
static void |
SxmpWriter.write(Writer out,
Operation operation,
boolean withXmlHeader) |
| Constructor and Description |
|---|
SxmpParsingException(SxmpErrorCode errorCode,
String msg,
Operation operation) |
Copyright © 2016. All rights reserved.