45 lines
1.3 KiB
Java
45 lines
1.3 KiB
Java
package com.thoughtworks.xstream.io;
|
|
|
|
import com.thoughtworks.xstream.core.util.Cloneables;
|
|
import com.thoughtworks.xstream.io.naming.NameCoder;
|
|
import com.thoughtworks.xstream.io.naming.NoNameCoder;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class AbstractReader implements ExtendedHierarchicalStreamReader {
|
|
private NameCoder nameCoder;
|
|
|
|
protected AbstractReader() {
|
|
this(new NoNameCoder());
|
|
}
|
|
|
|
public String decodeAttribute(String str) {
|
|
return this.nameCoder.decodeAttribute(str);
|
|
}
|
|
|
|
public String decodeNode(String str) {
|
|
return this.nameCoder.decodeNode(str);
|
|
}
|
|
|
|
protected String encodeAttribute(String str) {
|
|
return this.nameCoder.encodeAttribute(str);
|
|
}
|
|
|
|
protected String encodeNode(String str) {
|
|
return this.nameCoder.encodeNode(str);
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.io.ExtendedHierarchicalStreamReader
|
|
public String peekNextChild() {
|
|
throw new UnsupportedOperationException("peekNextChild");
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.io.HierarchicalStreamReader
|
|
public HierarchicalStreamReader underlyingReader() {
|
|
return this;
|
|
}
|
|
|
|
protected AbstractReader(NameCoder nameCoder) {
|
|
this.nameCoder = (NameCoder) Cloneables.cloneIfPossible(nameCoder);
|
|
}
|
|
}
|