36 lines
1.4 KiB
Java
36 lines
1.4 KiB
Java
package com.thoughtworks.xstream.io.path;
|
|
|
|
import com.liulishuo.filedownloader.model.FileDownloadModel;
|
|
import com.thoughtworks.xstream.converters.ErrorWriter;
|
|
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
|
import com.thoughtworks.xstream.io.ReaderWrapper;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class PathTrackingReader extends ReaderWrapper {
|
|
private final PathTracker pathTracker;
|
|
|
|
public PathTrackingReader(HierarchicalStreamReader hierarchicalStreamReader, PathTracker pathTracker) {
|
|
super(hierarchicalStreamReader);
|
|
this.pathTracker = pathTracker;
|
|
pathTracker.pushElement(getNodeName());
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.io.ReaderWrapper, com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.ErrorReporter
|
|
public void appendErrors(ErrorWriter errorWriter) {
|
|
errorWriter.add(FileDownloadModel.PATH, this.pathTracker.getPath().toString());
|
|
super.appendErrors(errorWriter);
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.io.ReaderWrapper, com.thoughtworks.xstream.io.HierarchicalStreamReader
|
|
public void moveDown() {
|
|
super.moveDown();
|
|
this.pathTracker.pushElement(getNodeName());
|
|
}
|
|
|
|
@Override // com.thoughtworks.xstream.io.ReaderWrapper, com.thoughtworks.xstream.io.HierarchicalStreamReader
|
|
public void moveUp() {
|
|
super.moveUp();
|
|
this.pathTracker.popElement();
|
|
}
|
|
}
|