mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
chore(archive): Mark as internal or private
This commit is contained in:
parent
03e1953c9f
commit
84d2924a82
2 changed files with 4 additions and 3 deletions
|
@ -7,8 +7,9 @@ import me.zhanghai.android.libarchive.Archive
|
|||
import me.zhanghai.android.libarchive.ArchiveEntry
|
||||
import me.zhanghai.android.libarchive.ArchiveException
|
||||
|
||||
class ArchiveInputStream(buffer: Long, size: Long) : InputStream() {
|
||||
internal class ArchiveInputStream(buffer: Long, size: Long) : InputStream() {
|
||||
private val lock = Any()
|
||||
|
||||
@Volatile
|
||||
private var isClosed = false
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import java.io.InputStream
|
|||
import me.zhanghai.android.libarchive.ArchiveException
|
||||
|
||||
class ArchiveReader(pfd: ParcelFileDescriptor) : Closeable {
|
||||
val size = pfd.statSize
|
||||
val address = Os.mmap(0, size, OsConstants.PROT_READ, OsConstants.MAP_PRIVATE, pfd.fileDescriptor, 0)
|
||||
private val size = pfd.statSize
|
||||
private val address = Os.mmap(0, size, OsConstants.PROT_READ, OsConstants.MAP_PRIVATE, pfd.fileDescriptor, 0)
|
||||
|
||||
fun <T> useEntries(block: (Sequence<ArchiveEntry>) -> T): T = ArchiveInputStream(address, size).use {
|
||||
block(generateSequence { it.getNextEntry() })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue