From ef495edbb626245bf9cb616007dbdeb25024f96a Mon Sep 17 00:00:00 2001 From: Gangphon Date: Thu, 14 Mar 2024 21:00:56 +0800 Subject: [PATCH] player --- .../main/java/com/xixun/xixunplayer/MainActivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/XixunPlayer/app/src/main/java/com/xixun/xixunplayer/MainActivity.java b/XixunPlayer/app/src/main/java/com/xixun/xixunplayer/MainActivity.java index d545df8..ecc5f5f 100644 --- a/XixunPlayer/app/src/main/java/com/xixun/xixunplayer/MainActivity.java +++ b/XixunPlayer/app/src/main/java/com/xixun/xixunplayer/MainActivity.java @@ -300,7 +300,14 @@ public class MainActivity extends ComponentActivity implements Choreographer.Fra return; } Util.deleteFiles(size, null); - for(var header : headers) if(! "program".equals(header.getFileName())) zip.extractFile(header, Util.programDir); + for(var header : headers) if(! "program".equals(header.getFileName())) { + Util.println(" name: " + header.getFileName()); + var fOut = new FileOutputStream(Util.programDir + "/" + header.getFileName()); + IOs.writeCloseIn(fOut, zip.getInputStream(header)); + fOut.flush(); + fOut.getFD().sync(); + fOut.close(); + } var json = progJson.toByteArray(); runOnUiThread(() -> { Util.println("Import Succeed");