mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 14:24:25 +02:00
Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
16746d78a5
28
README.md
28
README.md
@ -1,2 +1,28 @@
|
|||||||
# ARSCLib
|
# ARSCLib
|
||||||
Android binary resources read/write library
|
## Android binary resources read/write library
|
||||||
|
|
||||||
|
```java
|
||||||
|
import com.reandroid.lib.arsc.chunk.TableBlock;
|
||||||
|
import com.reandroid.lib.arsc.io.BlockReader;
|
||||||
|
|
||||||
|
public static void example() throws IOException {
|
||||||
|
File inFile=new File("resources.arsc");
|
||||||
|
BlockReader blockReader=new BlockReader(inFile);
|
||||||
|
|
||||||
|
TableBlock tableBlock=new TableBlock();
|
||||||
|
tableBlock.readBytes(blockReader);
|
||||||
|
|
||||||
|
// edit tableBlock as desired
|
||||||
|
|
||||||
|
tableBlock.refresh();
|
||||||
|
|
||||||
|
File outFile=new File("resources_out.arsc");
|
||||||
|
OutputStream outputStream=new FileOutputStream(outFile, false);
|
||||||
|
|
||||||
|
tableBlock.writeBytes(outputStream);
|
||||||
|
|
||||||
|
outputStream.flush();
|
||||||
|
outputStream.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user