org.schmant.arg
Class GZipExistingWritableFileProxy

java.lang.Object
  extended by org.schmant.arg.AbstractGZipWritableFileProxy
      extended by org.schmant.arg.GZipExistingWritableFileProxy
All Implemented Interfaces:
Lockable, WriteLockable, WritableFile

public class GZipExistingWritableFileProxy
extends AbstractGZipWritableFileProxy

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

The difference between this object and the GZipWritableFile 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:
GZipNewWritableFileProxy, GZipReadableFileProxy

Constructor Summary
GZipExistingWritableFileProxy(Object proxied)
          Create a new gzip writable file proxy for the proxied object.
GZipExistingWritableFileProxy(Object proxied, int bufSize)
          Create a new gzip writable file proxy for the proxied object.
 
Method Summary
protected  WritableFile getFileFromArgumentInterpreter(Object proxied)
           
 
Methods inherited from class org.schmant.arg.AbstractGZipWritableFileProxy
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

GZipExistingWritableFileProxy

public GZipExistingWritableFileProxy(Object proxied)
Create a new gzip writable file proxy for the proxied object. The proxy will use the default gzip buffer size.

Parameters:
proxied - The proxied object.

GZipExistingWritableFileProxy

public GZipExistingWritableFileProxy(Object proxied,
                                     int bufSize)
                              throws IllegalArgumentException
Create a new gzip writable file proxy for the proxied object. The proxy will use the supplied gzip buffer size.

Parameters:
proxied - The proxied object.
bufSize - The gzip buffer size, in bytes.
Throws:
IllegalArgumentException - If the buffer size is less than or equal to 0 bytes.
Method Detail

getFileFromArgumentInterpreter

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