本文整理汇总了Java中org.geomajas.global.ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的典型用法代码示例。如果您正苦于以下问题:Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的具体用法?Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION怎么用?Java ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.geomajas.global.ExceptionCode
的用法示例。
在下文中一共展示了ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTextNode
public void writeTextNode(String text) throws RenderException {
try {
checkState(false);
if (!elements.empty()) {
ElementState previous = elements.peek();
if (!previous.isOpened()) {
writer.write(">");
previous.setOpened(true);
}
previous.setNeedsCloseTag(true);
}
writer.write(WebSafeStringEncoder.escapeHTML(text));
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例2: closeElement
public void closeElement() throws RenderException {
try {
checkState(false);
if (!elements.empty()) {
ElementState current = elements.pop();
if (current.needsCloseTag()) {
if (!current.isOpened()) {
writer.write(">");
}
writer.write("</" + current.getName() + ">");
} else {
writer.write("/>");
}
unwindId();
}
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例3: writeAttribute
public void writeAttribute(String name, String value) throws RenderException {
try {
checkState(false);
writer.write(" " + name + "=" + "\"" + safeHtml(value) + "\"");
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例4: writeAttributeEnd
public void writeAttributeEnd() throws RenderException {
try {
checkState(true);
writer.write("\"");
inAttribute = false;
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例5: writeAttributeStart
public void writeAttributeStart(String name) throws RenderException {
try {
checkState(false);
writer.write(" " + name + "=\"");
inAttribute = true;
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例6: writePathContent
public void writePathContent(Coordinate[] coords, char path, char point) throws RenderException {
try {
checkState(true);
writer.write(path);
Coordinate curr = roundCoordinate(coords[0]);
writeCoordinate(curr);
Coordinate prev = curr;
int nCoords = coords.length;
if (nCoords > 1) {
writer.write(point);
for (int i = 1; i < nCoords; i++) {
curr = coords[i];
Coordinate delta = new Coordinate(curr.x - prev.x, curr.y - prev.y);
delta = roundCoordinate(delta);
if (!delta.equals(NULL_COORDINATE) || i == 1) {
writeCoordinate(delta);
prev.x += delta.x;
prev.y += delta.y;
writer.write(' ');
}
}
}
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例7: flush
public void flush() throws RenderException {
try {
while (!elements.empty()) {
closeElement();
}
writer.flush();
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例8: writeClosedPathContent
public void writeClosedPathContent(Coordinate[] coords) throws RenderException {
try {
checkState(true);
Coordinate[] openCoords = new Coordinate[coords.length - 1];
System.arraycopy(coords, 0, openCoords, 0, coords.length - 1);
writePathContent(openCoords);
writer.write('x');
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}
示例9: writeClosedPathContent
public void writeClosedPathContent(Coordinate[] coords) throws RenderException {
try {
checkState(true);
writePathContent(coords);
writer.write('Z');
} catch (IOException ioe) {
throw new RenderException(ioe, ExceptionCode.RENDER_DOCUMENT_IO_EXCEPTION);
}
}