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 < 1
public ReadableByteChannel openChannelForRead() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
openChannelForRead
in interface org.entityfs.ReadableFile
org.entityfs.lock.ReadLockRequiredException
org.entityfs.security.AccessDeniedException
public InputStream openForRead() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
openForRead
in interface org.entityfs.ReadableFile
org.entityfs.lock.ReadLockRequiredException
org.entityfs.security.AccessDeniedException
public org.entityfs.lock.EntityLock getReadLock()
getReadLock
in interface org.entityfs.lock.ReadLockable
public boolean isReadLockedByCurrentThread() throws IllegalStateException
isReadLockedByCurrentThread
in interface org.entityfs.lock.ReadLockable
IllegalStateException
public org.entityfs.lock.EntityLock lockForReading() throws org.entityfs.exception.LockTimeoutException
lockForReading
in interface org.entityfs.lock.ReadLockable
org.entityfs.exception.LockTimeoutException
public long getDataSize() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
getDataSize
in interface org.entityfs.ReadableFile
org.entityfs.lock.ReadLockRequiredException
org.entityfs.security.AccessDeniedException
public long getSize() throws org.entityfs.lock.ReadLockRequiredException, org.entityfs.security.AccessDeniedException
getSize
in interface org.entityfs.ReadableFile
org.entityfs.lock.ReadLockRequiredException
org.entityfs.security.AccessDeniedException