what-the-bank/sources/org/simpleframework/xml/stream/NodeBuilder.java

31 lines
919 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.simpleframework.xml.stream;
import java.io.InputStream;
import java.io.Reader;
import java.io.Writer;
/* loaded from: classes.dex */
public final class NodeBuilder {
private static Provider PROVIDER = ProviderFactory.getInstance();
public static InputNode read(InputStream inputStream) throws Exception {
return read(PROVIDER.provide(inputStream));
}
public static InputNode read(Reader reader) throws Exception {
return read(PROVIDER.provide(reader));
}
private static InputNode read(EventReader eventReader) throws Exception {
return new NodeReader(eventReader).readRoot();
}
public static OutputNode write(Writer writer) throws Exception {
return write(writer, new Format());
}
public static OutputNode write(Writer writer, Format format) throws Exception {
return new NodeWriter(writer, format).writeRoot();
}
}