mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 06:14:25 +02:00
close parser after parsing
This commit is contained in:
parent
9bb47b6f28
commit
340f8d07f9
@ -57,6 +57,7 @@ public class XMLDocumentParser {
|
||||
}
|
||||
}
|
||||
private void close(){
|
||||
closeParser();
|
||||
closeReader();
|
||||
closeFileInputStream();
|
||||
mResDocument=null;
|
||||
@ -91,6 +92,16 @@ public class XMLDocumentParser {
|
||||
}
|
||||
}
|
||||
}
|
||||
private void closeParser(){
|
||||
if(!(mParser instanceof Closeable)){
|
||||
return;
|
||||
}
|
||||
Closeable closeable = (Closeable) mParser;
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
private XMLDocument parseDocument() throws XmlPullParserException, IOException {
|
||||
mResDocument=null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user