Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Experimental CodeModel for antlr
Browse files Browse the repository at this point in the history
  • Loading branch information
weg2022 committed Jul 24, 2023
1 parent bc5245b commit 990a42f
Show file tree
Hide file tree
Showing 60 changed files with 23,957 additions and 2,220 deletions.
12 changes: 0 additions & 12 deletions app/src/main/java/com/apkide/ui/FileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,4 @@ public static void extractZipFile(InputStream zipIn, String targetPath) throws I
}
}

public interface FileArchiveReader {

Reader getArchiveEntryReader(String archivePath, String entryName, String encoding) throws IOException;

List<String> getArchiveDirectoryEntries(String archivePath, String entryName) throws IOException;

boolean isArchiveFileEntry(String filePath);

long getArchiveVersion(String archivePath);

void closeArchive() throws IOException;
}
}
9 changes: 2 additions & 7 deletions app/src/main/java/com/apkide/ui/util/JarArchiveReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static java.io.File.separator;

import com.apkide.common.IOUtils;
import com.apkide.ui.FileSystem;

import java.io.ByteArrayInputStream;
import java.io.File;
Expand All @@ -20,10 +19,9 @@
import java.util.zip.ZipFile;


public class JarArchiveReader implements FileSystem.FileArchiveReader {
public class JarArchiveReader {
private ZipFile archiveFile;

@Override
public Reader getArchiveEntryReader(String archivePath, String entryName, String encoding) throws IOException {

if (new File(archivePath).isDirectory()) {
Expand Down Expand Up @@ -52,7 +50,6 @@ public Reader getArchiveEntryReader(String archivePath, String entryName, String
return encoding == null ? new InputStreamReader(new ByteArrayInputStream(bytes)) : new InputStreamReader(new ByteArrayInputStream(bytes), encoding);
}

@Override
public List<String> getArchiveDirectoryEntries(String archivePath, String entryName) throws IOException {
ArrayList<String> entities = new ArrayList<>();
Enumeration<? extends ZipEntry> entries;
Expand Down Expand Up @@ -85,18 +82,16 @@ public List<String> getArchiveDirectoryEntries(String archivePath, String entryN
return entities;
}

@Override
public boolean isArchiveFileEntry(String filePath) {
return filePath.endsWith(".class") ||
filePath.endsWith(".java");
}

@Override
public long getArchiveVersion(String archivePath) {
return 0;
}

@Override

public void closeArchive() throws IOException {
if (archiveFile != null) {
archiveFile.close();
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/java/com/apkide/ui/util/JavaCompileEngine.java

This file was deleted.

Loading

0 comments on commit 990a42f

Please sign in to comment.