home *** CD-ROM | disk | FTP | other *** search
- package com.sun.xml.tree;
-
- import java.io.IOException;
- import java.io.Writer;
-
- public class XmlWriteContext {
- private Writer writer;
- private int indentLevel;
- private boolean prettyOutput;
-
- public XmlWriteContext(Writer var1) {
- this.writer = var1;
- }
-
- public XmlWriteContext(Writer var1, int var2) {
- this.writer = var1;
- this.prettyOutput = true;
- this.indentLevel = var2;
- }
-
- public int getIndentLevel() {
- return this.indentLevel;
- }
-
- public Writer getWriter() {
- return this.writer;
- }
-
- public boolean isEntityDeclared(String var1) {
- return "amp".equals(var1) || "lt".equals(var1) || "gt".equals(var1) || "quot".equals(var1) || "apos".equals(var1);
- }
-
- public boolean isPrettyOutput() {
- return this.prettyOutput;
- }
-
- public void printIndent() throws IOException {
- int var1 = this.indentLevel;
- if (this.prettyOutput) {
- this.writer.write(XmlDocument.eol);
-
- while(var1 >= 8) {
- this.writer.write(9);
- var1 -= 8;
- }
-
- while(var1-- > 0) {
- this.writer.write(32);
- }
-
- }
- }
-
- public void setIndentLevel(int var1) {
- this.indentLevel = var1;
- }
- }
-