org.schmant.task.at4j.lzma
Class LzmaExistingWritableFileProxy

java.lang.Object
  extended by org.schmant.task.at4j.lzma.AbstractLzmaWritableFileProxy
      extended by org.schmant.task.at4j.lzma.LzmaExistingWritableFileProxy
All Implemented Interfaces:
Lockable, WriteLockable, WritableFile

public class LzmaExistingWritableFileProxy
extends AbstractLzmaWritableFileProxy

This proxy LZMA encodes data written to another, already existing WritableFile. It can be used together with the ArgumentInterpreter.

Warning: LZMA compression does not seem to work reliably. Sometimes, when compressing, it seems to want to allocate too much (very much) memory, and that often leads to an OutOfMemoryError. Avoid using this class until the issue is fixed.

The difference between this object and the LzmaWritableFile is that this object uses the ArgumentInterpreter for interpreting the proxied file object.

The proxied object is interpreted using InterpretAsWritableFileStrategy.

Since:
0.8
Author:
Karl Gustafsson
See Also:
GZipExistingWritableFileProxy, BZip2ExistingWritableFileProxy, LzmaNewWritableFileProxy, LzmaReadableFileProxy
Task_package:
org.at4j

Constructor Summary
LzmaExistingWritableFileProxy(Object proxied)
          Create a new LZMA writable file proxy for the proxied object.
LzmaExistingWritableFileProxy(Object proxied, LzmaOutputStreamSettings settings)
          Create a new LZMA writable file proxy for the proxied object.
 
Method Summary
protected  WritableFile getFileFromArgumentInterpreter(Object proxied)
           
 
Methods inherited from class org.schmant.task.at4j.lzma.AbstractLzmaWritableFileProxy
getFile, getWriteLock, isWriteLockedByCurrentThread, lockForWriting, openChannelForAppend, openChannelForWrite, openForAppend, openForWrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LzmaExistingWritableFileProxy

public LzmaExistingWritableFileProxy(Object proxied)
Create a new LZMA writable file proxy for the proxied object. The proxy will use the default LZMA compression settings.

Parameters:
proxied - The proxied object.

LzmaExistingWritableFileProxy

public LzmaExistingWritableFileProxy(Object proxied,
                                     LzmaOutputStreamSettings settings)
Create a new LZMA writable file proxy for the proxied object. The proxy will use the supplied compression settings.

Parameters:
proxied - The proxied object.
settings - The compression settings.
Method Detail

getFileFromArgumentInterpreter

protected WritableFile getFileFromArgumentInterpreter(Object proxied)
Specified by:
getFileFromArgumentInterpreter in class AbstractLzmaWritableFileProxy