| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package com.android.internal.util; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
|
| 21 |
import org.xmlpull.v1.XmlSerializer; |
| 22 |
|
| 23 |
import java.io.IOException; |
| 24 |
import java.io.OutputStream; |
| 25 |
import java.io.Writer; |
| 26 |
import java.util.Objects; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
public class XmlSerializerWrapper implements XmlSerializer { |
| 32 |
private final XmlSerializer mWrapped; |
| 33 |
|
| 34 |
public XmlSerializerWrapper(@NonNull XmlSerializer wrapped) { |
| 35 |
mWrapped = Objects.requireNonNull(wrapped); |
| 36 |
} |
| 37 |
|
| 38 |
public void setFeature(String name, boolean state) { |
| 39 |
mWrapped.setFeature(name, state); |
| 40 |
} |
| 41 |
|
| 42 |
public boolean getFeature(String name) { |
| 43 |
return mWrapped.getFeature(name); |
| 44 |
} |
| 45 |
|
| 46 |
public void setProperty(String name, Object value) { |
| 47 |
mWrapped.setProperty(name, value); |
| 48 |
} |
| 49 |
|
| 50 |
public Object getProperty(String name) { |
| 51 |
return mWrapped.getProperty(name); |
| 52 |
} |
| 53 |
|
| 54 |
public void setOutput(OutputStream os, String encoding) throws IOException { |
| 55 |
mWrapped.setOutput(os, encoding); |
| 56 |
} |
| 57 |
|
| 58 |
public void setOutput(Writer writer) |
| 59 |
throws IOException, IllegalArgumentException, IllegalStateException { |
| 60 |
mWrapped.setOutput(writer); |
| 61 |
} |
| 62 |
|
| 63 |
public void startDocument(String encoding, Boolean standalone) throws IOException { |
| 64 |
mWrapped.startDocument(encoding, standalone); |
| 65 |
} |
| 66 |
|
| 67 |
public void endDocument() throws IOException { |
| 68 |
mWrapped.endDocument(); |
| 69 |
} |
| 70 |
|
| 71 |
public void setPrefix(String prefix, String namespace) throws IOException { |
| 72 |
mWrapped.setPrefix(prefix, namespace); |
| 73 |
} |
| 74 |
|
| 75 |
public String getPrefix(String namespace, boolean generatePrefix) { |
| 76 |
return mWrapped.getPrefix(namespace, generatePrefix); |
| 77 |
} |
| 78 |
|
| 79 |
public int getDepth() { |
| 80 |
return mWrapped.getDepth(); |
| 81 |
} |
| 82 |
|
| 83 |
public String getNamespace() { |
| 84 |
return mWrapped.getNamespace(); |
| 85 |
} |
| 86 |
|
| 87 |
public String getName() { |
| 88 |
return mWrapped.getName(); |
| 89 |
} |
| 90 |
|
| 91 |
public XmlSerializer startTag(String namespace, String name) throws IOException { |
| 92 |
return mWrapped.startTag(namespace, name); |
| 93 |
} |
| 94 |
|
| 95 |
public XmlSerializer attribute(String namespace, String name, String value) |
| 96 |
throws IOException { |
| 97 |
return mWrapped.attribute(namespace, name, value); |
| 98 |
} |
| 99 |
|
| 100 |
public XmlSerializer endTag(String namespace, String name) throws IOException { |
| 101 |
return mWrapped.endTag(namespace, name); |
| 102 |
} |
| 103 |
|
| 104 |
public XmlSerializer text(String text) throws IOException{ |
| 105 |
return mWrapped.text(text); |
| 106 |
} |
| 107 |
|
| 108 |
public XmlSerializer text(char[] buf, int start, int len) throws IOException { |
| 109 |
return mWrapped.text(buf, start, len); |
| 110 |
} |
| 111 |
|
| 112 |
public void cdsect(String text) |
| 113 |
throws IOException, IllegalArgumentException, IllegalStateException { |
| 114 |
mWrapped.cdsect(text); |
| 115 |
} |
| 116 |
|
| 117 |
public void entityRef(String text) throws IOException { |
| 118 |
mWrapped.entityRef(text); |
| 119 |
} |
| 120 |
|
| 121 |
public void processingInstruction(String text) throws IOException { |
| 122 |
mWrapped.processingInstruction(text); |
| 123 |
} |
| 124 |
|
| 125 |
public void comment(String text) throws IOException { |
| 126 |
mWrapped.comment(text); |
| 127 |
} |
| 128 |
|
| 129 |
public void docdecl(String text) throws IOException { |
| 130 |
mWrapped.docdecl(text); |
| 131 |
} |
| 132 |
|
| 133 |
public void ignorableWhitespace(String text) throws IOException { |
| 134 |
mWrapped.ignorableWhitespace(text); |
| 135 |
} |
| 136 |
|
| 137 |
public void flush() throws IOException { |
| 138 |
mWrapped.flush(); |
| 139 |
} |
| 140 |
} |