public class LzmaReadableFile extends Object implements org.entityfs.ReadableFile
ReadableFile that transparently decompresses the contents
of a wrapped file using LZMA compression.
The LZMA stream is opened on a buffered input stream whose buffer size can be configured.
A ReadableFile can be made into a
NamedReadableFile using the
NamedReadableFileAdapter.
LzmaWritableFile,
GZipReadableFile,
BZip2ReadableFile| Constructor and Description |
|---|
LzmaReadableFile(org.entityfs.ReadableFile adapted)
Create a new adapter.
|
LzmaReadableFile(org.entityfs.ReadableFile adapted,
int bufSize)
Create a new adapter.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDataSize() |
org.entityfs.lock.EntityLock |
getReadLock() |
long |
getSize() |
boolean |
isReadLockedByCurrentThread() |
org.entityfs.lock.EntityLock |
lockForReading() |
ReadableByteChannel |
openChannelForRead() |
InputStream |
openForRead() |
public LzmaReadableFile(org.entityfs.ReadableFile adapted)
BufferedInputStream buffer size.adapted - The adapted file.LzmaReadableFile(ReadableFile, int)public LzmaReadableFile(org.entityfs.ReadableFile adapted,
int bufSize)
throws IllegalArgumentException
adapted - The adapted file.bufSize - The buffer size for buffered input streams.IllegalArgumentException - If the buffer size is < 1public ReadableByteChannel openChannelForRead() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
openChannelForRead in interface org.entityfs.ReadableFileorg.entityfs.lock.ReadLockRequiredExceptionorg.entityfs.security.AccessDeniedExceptionpublic InputStream openForRead() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
openForRead in interface org.entityfs.ReadableFileorg.entityfs.lock.ReadLockRequiredExceptionorg.entityfs.security.AccessDeniedExceptionpublic org.entityfs.lock.EntityLock getReadLock()
getReadLock in interface org.entityfs.lock.ReadLockablepublic boolean isReadLockedByCurrentThread()
throws IllegalStateException
isReadLockedByCurrentThread in interface org.entityfs.lock.ReadLockableIllegalStateExceptionpublic org.entityfs.lock.EntityLock lockForReading()
throws org.entityfs.exception.LockTimeoutException
lockForReading in interface org.entityfs.lock.ReadLockableorg.entityfs.exception.LockTimeoutExceptionpublic long getDataSize()
throws org.entityfs.lock.ReadLockRequiredException,
org.entityfs.security.AccessDeniedException
getDataSize in interface org.entityfs.ReadableFileorg.entityfs.lock.ReadLockRequiredExceptionorg.entityfs.security.AccessDeniedExceptionpublic long getSize()
throws org.entityfs.lock.ReadLockRequiredException,
org.entityfs.security.AccessDeniedException
getSize in interface org.entityfs.ReadableFileorg.entityfs.lock.ReadLockRequiredExceptionorg.entityfs.security.AccessDeniedException